
:root {
  --bg: #070a10;
  --bg-2: #0a0f18;
  --panel: #0d1420;
  --panel-2: #111b2a;
  --panel-3: #162236;
  --line: rgba(125, 159, 199, .16);
  --line-strong: rgba(92, 169, 255, .34);
  --text: #f5f8fc;
  --muted: #8a9aae;
  --blue: #4ba4ff;
  --blue-2: #7cc1ff;
  --orange: #ff9c3f;
  --orange-2: #ffc06f;
  --red: #ff6570;
  --green: #68d99a;
  --yellow: #f2c75c;
  --purple: #ab8cff;
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin:0; min-height:100%; background:var(--bg); color:var(--text); }
body {
  min-height:100dvh;
  overflow-x:hidden;
  background:
    radial-gradient(circle at 15% -10%, rgba(75,164,255,.12), transparent 30%),
    radial-gradient(circle at 100% 18%, rgba(255,156,63,.06), transparent 24%),
    linear-gradient(180deg, #070a10 0%, #080c13 48%, #06090e 100%);
}
body::before {
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  opacity:.15;
  background-image:
    linear-gradient(rgba(93,132,180,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(93,132,180,.06) 1px, transparent 1px);
  background-size:28px 28px;
  mask-image:linear-gradient(180deg, rgba(0,0,0,.8), transparent 72%);
}
button, input, select, textarea { font:inherit; }
button { color:inherit; cursor:pointer; }
button:active { transform:scale(.985); }
button:disabled { opacity:.55; cursor:default; }

#app {
  min-height:100dvh;
  padding-bottom:calc(78px + var(--safe-bottom));
  position:relative;
}

.topbar {
  position:sticky;
  top:0;
  z-index:20;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:calc(12px + var(--safe-top)) 16px 11px;
  background:linear-gradient(180deg, rgba(7,10,16,.98), rgba(7,10,16,.91) 75%, rgba(7,10,16,.72));
  backdrop-filter:blur(20px);
  border-bottom:1px solid rgba(75,164,255,.10);
}

.brand-lockup { display:flex; align-items:center; gap:10px; min-width:0; }
.brand-mark {
  width:38px;
  height:38px;
  border-radius:12px;
  display:grid;
  place-items:center;
  position:relative;
  overflow:hidden;
  background:
    linear-gradient(145deg, rgba(75,164,255,.18), rgba(255,156,63,.08)),
    #0d1420;
  border:1px solid rgba(75,164,255,.28);
  box-shadow:0 8px 25px rgba(0,0,0,.22), inset 0 0 22px rgba(75,164,255,.05);
}
.brand-mark::after {
  content:"";
  position:absolute;
  right:6px;
  bottom:8px;
  width:14px;
  height:3px;
  border-radius:999px;
  background:var(--orange);
  box-shadow:0 0 12px rgba(255,156,63,.34);
}
.brand-mark span {
  font-size:23px;
  line-height:1;
  font-weight:900;
  color:var(--blue-2);
  transform:translate(-2px,-1px);
}
.eyebrow {
  color:var(--orange);
  font-size:9px;
  letter-spacing:.23em;
  font-weight:900;
  margin-bottom:2px;
}
h1 { margin:0; font-size:25px; letter-spacing:-.04em; line-height:1.05; }
h2 { margin:0; font-size:17px; }
h3 { margin:0; }

.icon-btn {
  border:1px solid rgba(75,164,255,.22);
  background:linear-gradient(145deg, rgba(75,164,255,.09), rgba(255,156,63,.04)), var(--panel);
  border-radius:13px;
  width:42px;
  height:42px;
  font-size:25px;
  line-height:1;
  box-shadow:inset 0 0 20px rgba(75,164,255,.035);
}
.add-btn { color:var(--orange); }

.content {
  width:min(760px,100%);
  margin:0 auto;
  padding:12px 14px 28px;
}

.stats {
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:9px;
  margin-bottom:16px;
}
.stat-card {
  min-height:79px;
  border:1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(75,164,255,.035), transparent 58%),
    var(--panel);
  border-radius:17px;
  padding:13px 14px;
  position:relative;
  overflow:hidden;
}
.stat-card::after {
  content:"";
  position:absolute;
  top:0;
  left:0;
  width:32%;
  height:2px;
  border-radius:99px;
  background:var(--blue);
  opacity:.6;
}
.stat-card.accent::after { background:var(--orange); }
.stat-card.red::after { background:var(--red); }
.stat-card.green::after { background:var(--green); }
.stat-label {
  font-size:10px;
  letter-spacing:.05em;
  color:var(--muted);
  font-weight:700;
}
.stat-value {
  font-size:28px;
  line-height:1;
  font-weight:850;
  margin-top:10px;
  letter-spacing:-.04em;
}
.stat-card.accent .stat-value { color:var(--orange-2); }
.stat-card.blue .stat-value { color:var(--blue-2); }
.stat-card.red .stat-value { color:#ff8992; }
.stat-card.green .stat-value { color:#85e7ae; }

.home-shortcuts {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
  margin-bottom:22px;
}
.shortcut-card {
  min-height:112px;
  border:1px solid var(--line);
  background:var(--panel);
  border-radius:18px;
  padding:14px;
  text-align:left;
  position:relative;
  overflow:hidden;
}
.shortcut-card::before {
  content:"";
  position:absolute;
  right:-22px;
  top:-22px;
  width:86px;
  height:86px;
  border-radius:50%;
  background:rgba(75,164,255,.055);
}
.shortcut-card strong {
  display:block;
  font-size:14px;
  margin-bottom:6px;
  position:relative;
}
.shortcut-card small {
  display:block;
  color:var(--muted);
  font-size:11px;
  line-height:1.45;
  position:relative;
}
.shortcut-card.proposal {
  border-color:rgba(255,156,63,.19);
  background:linear-gradient(145deg, rgba(255,156,63,.065), var(--panel) 48%);
}
.shortcut-card.proposal::before { background:rgba(255,156,63,.06); }
.shortcut-card.ai-entry {
  grid-column:1 / -1;
  min-height:88px;
  border-color:rgba(171,140,255,.19);
  background:linear-gradient(120deg, rgba(75,164,255,.065), rgba(171,140,255,.055), rgba(255,156,63,.04)), var(--panel);
}
.shortcut-count {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  height:25px;
  padding:0 8px;
  border-radius:999px;
  margin-top:10px;
  font-size:10px;
  font-weight:850;
  color:var(--orange);
  background:rgba(255,156,63,.09);
  border:1px solid rgba(255,156,63,.13);
  position:relative;
}
.ai-entry .shortcut-count {
  color:#c9b6ff;
  background:rgba(171,140,255,.10);
  border-color:rgba(171,140,255,.16);
}

.section { margin:0 0 23px; }
.section-title {
  display:flex;
  justify-content:space-between;
  align-items:end;
  margin:0 2px 9px;
}
.section-title h2 {
  font-size:15px;
  letter-spacing:.01em;
}
.section-title small {
  color:var(--muted);
  font-size:10px;
}
.section-title h2::before {
  content:"";
  display:inline-block;
  width:3px;
  height:13px;
  border-radius:10px;
  background:linear-gradient(180deg,var(--blue),var(--orange));
  margin-right:8px;
  vertical-align:-1px;
}

.task-list { display:flex; flex-direction:column; gap:8px; }
.task-card {
  width:100%;
  text-align:left;
  border:1px solid var(--line);
  background:linear-gradient(145deg, rgba(75,164,255,.024), transparent 45%), var(--panel);
  border-radius:16px;
  padding:13px;
  display:grid;
  grid-template-columns:3px 1fr auto;
  gap:11px;
  align-items:stretch;
  box-shadow:0 6px 22px rgba(0,0,0,.10);
}
.task-card:hover { border-color:rgba(75,164,255,.24); }
.priority-bar { border-radius:10px; background:var(--muted); }
.priority-high { background:var(--red); box-shadow:0 0 13px rgba(255,101,112,.25); }
.priority-medium { background:var(--orange); box-shadow:0 0 13px rgba(255,156,63,.20); }
.priority-low { background:var(--blue); box-shadow:0 0 13px rgba(75,164,255,.20); }
.task-main { min-width:0; }
.task-title {
  display:block;
  font-size:14px;
  font-weight:800;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.task-meta {
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-top:7px;
}
.chip {
  display:inline-flex;
  align-items:center;
  min-height:21px;
  padding:2px 7px;
  border-radius:999px;
  border:1px solid rgba(126,158,195,.13);
  background:rgba(255,255,255,.022);
  color:var(--muted);
  font-size:9px;
}
.chip.status {
  color:#dcecff;
  border-color:rgba(75,164,255,.18);
  background:rgba(75,164,255,.06);
}
.task-note {
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  color:var(--muted);
  font-size:11px;
  line-height:1.5;
  margin-top:7px;
}
.chevron { color:#52647a; align-self:center; font-size:18px; }

.empty {
  border:1px dashed rgba(107,145,190,.18);
  border-radius:16px;
  padding:23px 16px;
  text-align:center;
  color:var(--muted);
  background:rgba(75,164,255,.018);
  font-size:12px;
}
.empty strong { display:block; color:var(--text); margin-bottom:5px; }

.notice {
  border:1px solid rgba(75,164,255,.15);
  background:linear-gradient(90deg, rgba(75,164,255,.055), rgba(255,156,63,.025));
  color:#afc8e7;
  padding:11px 13px;
  border-radius:14px;
  font-size:11px;
  line-height:1.55;
  margin-bottom:12px;
}

.toolbar { display:flex; gap:8px; margin-bottom:10px; }
.search {
  width:100%;
  border:1px solid var(--line);
  background:rgba(13,20,32,.92);
  color:var(--text);
  border-radius:13px;
  padding:11px 13px;
  outline:none;
}
.search:focus { border-color:rgba(75,164,255,.5); box-shadow:0 0 0 3px rgba(75,164,255,.05); }

.filter-row {
  display:flex;
  gap:7px;
  overflow:auto;
  padding:0 0 11px;
  scrollbar-width:none;
}
.filter-row::-webkit-scrollbar { display:none; }
.filter-btn {
  white-space:nowrap;
  border:1px solid var(--line);
  background:var(--panel);
  border-radius:999px;
  padding:7px 11px;
  color:var(--muted);
  font-size:11px;
}
.filter-btn.active {
  color:#fff;
  border-color:rgba(255,156,63,.42);
  background:rgba(255,156,63,.085);
  box-shadow:inset 0 0 18px rgba(255,156,63,.025);
}

.bottom-nav {
  position:fixed;
  left:50%;
  bottom:0;
  z-index:30;
  transform:translateX(-50%);
  width:min(760px,100%);
  display:grid;
  grid-template-columns:repeat(6,1fr);
  border-top:1px solid rgba(75,164,255,.13);
  background:rgba(8,12,19,.94);
  backdrop-filter:blur(22px);
  padding:7px 5px calc(6px + var(--safe-bottom));
  box-shadow:0 -12px 35px rgba(0,0,0,.22);
}
.nav-item {
  border:0;
  background:transparent;
  color:#637287;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
  min-height:48px;
  padding:5px 2px 2px;
  font-size:8px;
  font-weight:800;
  position:relative;
}
.nav-icon { font-size:18px; line-height:1; }
.nav-item.active { color:#eaf4ff; }
.nav-item.active::before {
  content:"";
  position:absolute;
  top:-7px;
  width:24px;
  height:2px;
  border-radius:999px;
  background:linear-gradient(90deg,var(--blue),var(--orange));
  box-shadow:0 0 10px rgba(75,164,255,.25);
}
.nav-item.active .nav-icon { color:var(--orange); }

.sheet {
  width:min(760px,100%);
  max-width:100%;
  height:min(94dvh,1000px);
  margin:auto auto 0;
  border:1px solid rgba(75,164,255,.18);
  border-radius:24px 24px 0 0;
  padding:0;
  background:
    radial-gradient(circle at 100% 0%, rgba(75,164,255,.07), transparent 24%),
    #0a1019;
  color:var(--text);
  overflow:hidden;
  box-shadow:0 -20px 60px rgba(0,0,0,.42);
}
.sheet::backdrop { background:rgba(0,0,0,.72); backdrop-filter:blur(7px); }
.sheet form { height:100%; overflow:auto; padding-bottom:calc(28px + var(--safe-bottom)); }
.detail-sheet { overflow:auto; padding-bottom:calc(25px + var(--safe-bottom)); }

.sheet-head {
  position:sticky;
  top:0;
  z-index:5;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  padding:14px 15px;
  border-bottom:1px solid rgba(75,164,255,.11);
  background:rgba(10,16,25,.94);
  backdrop-filter:blur(20px);
}
.sheet-head > :last-child { justify-self:end; }
.text-btn { border:0; background:transparent; color:var(--muted); padding:7px 0; }
.text-btn.primary { color:var(--orange); font-weight:800; }

.form-section { padding:17px 15px 0; }
.form-section label { display:block; margin-bottom:14px; }
.form-section label > span {
  display:block;
  color:var(--muted);
  font-size:10px;
  margin:0 0 6px 3px;
}
.form-section input:not([type="checkbox"]),
.form-section select,
.form-section textarea,
.ai-textarea {
  width:100%;
  border:1px solid var(--line);
  color:var(--text);
  background:#0c1420;
  border-radius:13px;
  padding:11px 12px;
  outline:none;
  resize:vertical;
}
.form-section textarea { min-height:88px; }
.form-section input:focus,
.form-section select:focus,
.form-section textarea:focus,
.ai-textarea:focus {
  border-color:rgba(75,164,255,.48);
  box-shadow:0 0 0 3px rgba(75,164,255,.045);
}
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:9px; }

.danger-zone { padding:20px 15px 38px; }
.danger-btn {
  width:100%;
  border:1px solid rgba(255,101,112,.24);
  color:var(--red);
  background:rgba(255,101,112,.07);
  border-radius:13px;
  padding:12px;
}

.detail-content { padding:17px 15px 38px; }
.detail-title {
  font-size:23px;
  font-weight:880;
  letter-spacing:-.04em;
  margin-bottom:9px;
  word-break:break-word;
}
.detail-meta { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:18px; }
.detail-block { margin-bottom:18px; }
.detail-label {
  color:var(--muted);
  font-size:10px;
  margin-bottom:7px;
  letter-spacing:.02em;
}
.detail-value {
  white-space:pre-wrap;
  line-height:1.62;
  background:#0d1622;
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  min-height:43px;
  font-size:12px;
}
.detail-empty { color:#526174; }

.action-stack { display:flex; flex-direction:column; gap:9px; }
.action-btn {
  width:100%;
  border:1px solid var(--line);
  background:var(--panel);
  color:var(--text);
  border-radius:13px;
  padding:12px 13px;
  text-align:center;
  font-weight:800;
  font-size:12px;
}
.action-btn.primary {
  border-color:rgba(255,156,63,.25);
  background:linear-gradient(90deg, rgba(75,164,255,.06), rgba(255,156,63,.09));
  color:#ffd09e;
}
.action-btn.secondary {
  border-color:rgba(75,164,255,.22);
  background:rgba(75,164,255,.065);
  color:#bfe0ff;
}
.inline-hint {
  display:block;
  margin-top:5px;
  color:var(--muted);
  font-size:9px;
  line-height:1.45;
}

.resource-card {
  width:100%;
  text-align:left;
  border:1px solid var(--line);
  background:linear-gradient(145deg, rgba(75,164,255,.03), transparent 48%), var(--panel);
  border-radius:16px;
  padding:14px;
}
.resource-card-top {
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
}
.resource-name { font-size:14px; font-weight:850; word-break:break-all; color:#dcecff; }
.resource-display { color:var(--text); font-size:12px; margin-top:3px; }
.resource-desc {
  color:var(--muted);
  font-size:11px;
  line-height:1.5;
  margin-top:8px;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.resource-related { margin-top:9px; display:flex; gap:6px; flex-wrap:wrap; }
.resource-status {
  font-size:9px;
  border:1px solid rgba(75,164,255,.17);
  background:rgba(75,164,255,.05);
  border-radius:999px;
  padding:4px 7px;
  white-space:nowrap;
  color:#b9dcff;
}

.proposal-card {
  width:100%;
  text-align:left;
  border:1px solid var(--line);
  background:linear-gradient(145deg, rgba(255,156,63,.035), transparent 48%), var(--panel);
  border-radius:16px;
  padding:13px;
}
.proposal-top { display:flex; gap:9px; justify-content:space-between; align-items:flex-start; }
.proposal-title { font-size:14px; font-weight:850; }
.proposal-text {
  color:var(--muted);
  font-size:11px;
  line-height:1.55;
  margin-top:7px;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.proposal-meta { display:flex; gap:6px; flex-wrap:wrap; margin-top:9px; }
.proposal-badge {
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  border:1px solid var(--line);
  padding:3px 7px;
  font-size:9px;
  color:var(--muted);
}

.ai-quick-grid { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.ai-textarea { min-height:108px; }
.ai-status {
  min-height:20px;
  color:var(--muted);
  font-size:11px;
  line-height:1.5;
  margin:11px 2px 0;
}
.ai-status.error { color:var(--red); }
.ai-status.ok { color:var(--green); }
.ai-answer-wrap { margin-top:17px; }
.ai-answer { white-space:pre-wrap; line-height:1.65; }
.ai-copy-btn { margin-top:8px; }

.version-list { display:flex; flex-direction:column; gap:8px; }
.version-row {
  border:1px solid var(--line);
  background:#0d1622;
  border-radius:13px;
  padding:11px 12px;
}
.version-row-top {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}
.version-name { font-weight:850; font-size:13px; color:#e9f4ff; }
.version-type {
  font-size:9px;
  border-radius:999px;
  padding:3px 7px;
  border:1px solid rgba(255,156,63,.18);
  color:#ffc486;
  background:rgba(255,156,63,.055);
}
.version-note { margin-top:7px; color:var(--muted); font-size:11px; line-height:1.5; white-space:pre-wrap; }
.version-date { margin-top:6px; color:#5e7086; font-size:9px; }
.version-empty {
  border:1px dashed var(--line);
  border-radius:13px;
  padding:14px;
  color:var(--muted);
  font-size:11px;
  text-align:center;
}

@media (min-width:650px) {
  body { background:#05080d; }
  #app {
    width:430px;
    margin:0 auto;
    border-left:1px solid rgba(75,164,255,.11);
    border-right:1px solid rgba(75,164,255,.11);
    background:
      radial-gradient(circle at 5% 0%, rgba(75,164,255,.08), transparent 25%),
      var(--bg);
    min-height:100dvh;
  }
  .content, .bottom-nav, .sheet { width:430px; }
}


.data-entry {
  grid-column:1 / -1;
  min-height:88px;
  border-color:rgba(104,217,154,.18);
  background:
    linear-gradient(120deg, rgba(75,164,255,.045), rgba(104,217,154,.045), rgba(255,156,63,.035)),
    var(--panel);
}
.data-entry .shortcut-count {
  color:#91e6b4;
  background:rgba(104,217,154,.09);
  border-color:rgba(104,217,154,.14);
}

.data-overview {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
  margin-bottom:19px;
}
.data-count-card {
  border:1px solid var(--line);
  border-radius:13px;
  background:#0d1622;
  padding:11px 8px;
  text-align:center;
}
.data-count-value {
  font-size:20px;
  font-weight:880;
  line-height:1;
  color:#dcecff;
}
.data-count-label {
  color:var(--muted);
  font-size:8px;
  margin-top:6px;
}

.hidden-file-input {
  display:none;
}

.restore-preview {
  border:1px solid rgba(255,156,63,.19);
  background:linear-gradient(145deg, rgba(255,156,63,.045), rgba(75,164,255,.025));
  border-radius:15px;
  padding:13px;
  margin:4px 0 20px;
}
.restore-summary {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:7px;
  margin-bottom:11px;
}
.restore-summary-item {
  border:1px solid var(--line);
  border-radius:11px;
  padding:9px 6px;
  text-align:center;
  background:rgba(7,10,16,.38);
}
.restore-summary-item strong {
  display:block;
  font-size:17px;
  color:#f6f9fd;
}
.restore-summary-item span {
  display:block;
  color:var(--muted);
  font-size:8px;
  margin-top:4px;
}
.restore-meta {
  color:var(--muted);
  font-size:10px;
  line-height:1.6;
  margin-bottom:11px;
}
.restore-actions {
  margin-top:9px;
}


.ai-result-actions {
  margin-top:14px;
  padding-top:13px;
  border-top:1px solid rgba(75,164,255,.11);
}
.ai-save-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:8px;
}
.ai-save-grid + .ai-save-grid {
  margin-top:8px;
}
.ai-result-actions[hidden] {
  display:none;
}

.proposal-syncbar{display:flex;gap:8px;align-items:center;margin-bottom:11px}
.proposal-sync-status{flex:1;min-width:0;border:1px solid var(--line);background:#0d1622;border-radius:12px;padding:9px 10px;color:var(--muted);font-size:10px;line-height:1.4}
.proposal-sync-status.ok{color:#9ae8ba;border-color:rgba(104,217,154,.18)}
.proposal-sync-status.error{color:#ff9aa2;border-color:rgba(255,101,112,.20)}
.proposal-sync-status.loading{color:#b8dcff;border-color:rgba(75,164,255,.20)}
.proposal-sync-btn{flex:0 0 auto;min-width:70px}
.proposal-remote-mark{color:#9bcfff;border-color:rgba(75,164,255,.18);background:rgba(75,164,255,.05)}
.proposal-photo{width:100%;display:block;border-radius:13px;border:1px solid var(--line);background:#08101a;max-height:460px;object-fit:contain}
.proposal-admin-form{display:flex;flex-direction:column;gap:10px}
.proposal-admin-form select,.proposal-admin-form textarea{width:100%;border:1px solid var(--line);color:var(--text);background:#0c1420;border-radius:13px;padding:11px 12px;outline:none}
.proposal-admin-form textarea{min-height:120px;resize:vertical}
.proposal-admin-form select:focus,.proposal-admin-form textarea:focus{border-color:rgba(75,164,255,.48);box-shadow:0 0 0 3px rgba(75,164,255,.045)}
.proposal-save-row{display:grid;grid-template-columns:1fr;gap:8px}


.sync-settings-card {
  border:1px solid rgba(75,164,255,.16);
  background:linear-gradient(145deg, rgba(75,164,255,.04), rgba(104,217,154,.025)), #0d1622;
  border-radius:14px;
  padding:12px;
}
.sync-key-label {
  display:block;
}
.sync-key-label span {
  display:block;
  color:var(--muted);
  font-size:10px;
  margin-bottom:6px;
}
.sync-key-label input {
  width:100%;
  border:1px solid var(--line);
  color:var(--text);
  background:#09111c;
  border-radius:12px;
  padding:11px 12px;
  outline:none;
}
.sync-key-label input:focus {
  border-color:rgba(75,164,255,.48);
  box-shadow:0 0 0 3px rgba(75,164,255,.045);
}
.sync-key-actions {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:9px;
}
.proposal-pending-mark {
  color:#ffd09e;
  border-color:rgba(255,156,63,.20);
  background:rgba(255,156,63,.06);
}
.proposal-photo-loading {
  border:1px dashed var(--line);
  border-radius:13px;
  padding:16px;
  text-align:center;
  color:var(--muted);
  font-size:11px;
}


.history-list {
  display:flex;
  flex-direction:column;
  gap:8px;
}
.history-row {
  border:1px solid var(--line);
  background:linear-gradient(145deg, rgba(75,164,255,.035), transparent 55%), #0d1622;
  border-radius:13px;
  padding:11px 12px;
}
.history-row.failed {
  border-color:rgba(255,101,112,.20);
  background:linear-gradient(145deg, rgba(255,101,112,.04), transparent 55%), #0d1622;
}
.history-row-top {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.history-main {
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.history-status,
.history-stage {
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:3px 7px;
  font-size:9px;
  border:1px solid var(--line);
}
.history-status {
  color:#dcecff;
  border-color:rgba(75,164,255,.17);
  background:rgba(75,164,255,.05);
}
.history-stage-queued {
  color:#ffd09e;
  border-color:rgba(255,156,63,.19);
  background:rgba(255,156,63,.055);
}
.history-stage-applied {
  color:#99e7ba;
  border-color:rgba(104,217,154,.18);
  background:rgba(104,217,154,.055);
}
.history-stage-failed {
  color:#ff9ca4;
  border-color:rgba(255,101,112,.20);
  background:rgba(255,101,112,.055);
}
.history-date {
  flex:0 0 auto;
  color:#607187;
  font-size:8px;
  white-space:nowrap;
}
.history-reply {
  white-space:pre-wrap;
  margin-top:8px;
  color:#c7d3e2;
  line-height:1.55;
  font-size:11px;
}
.history-no-reply {
  margin-top:8px;
  color:#65758a;
  font-size:10px;
}
.history-error {
  margin-top:7px;
  color:#ff9ca4;
  font-size:10px;
}
.history-empty {
  border:1px dashed var(--line);
  border-radius:12px;
  padding:14px;
  color:var(--muted);
  text-align:center;
  font-size:10px;
}
