:root {
  color-scheme: dark;
  --bg: #06111b;
  --surface: rgba(12, 29, 42, .82);
  --surface-2: rgba(19, 40, 55, .78);
  --line: rgba(169, 211, 229, .13);
  --text: #edf7fb;
  --muted: #91aebb;
  --cyan: #4de0d2;
  --blue: #53a8ff;
  --green: #59dc9b;
  --amber: #ffc45c;
  --red: #ff7185;
  --shadow: 0 20px 60px rgba(0, 0, 0, .25);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(45, 169, 196, .15), transparent 34rem),
    linear-gradient(165deg, #071521 0%, #06111b 52%, #091722 100%);
  padding: env(safe-area-inset-top) max(16px, env(safe-area-inset-right)) calc(34px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

button, input, select, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }
.ambient { position: fixed; border-radius: 50%; filter: blur(80px); opacity: .16; pointer-events: none; }
.ambient-one { width: 250px; height: 250px; background: var(--cyan); top: -110px; right: -80px; }
.ambient-two { width: 210px; height: 210px; background: var(--blue); bottom: 8%; left: -120px; }

.topbar {
  position: sticky;
  top: env(safe-area-inset-top);
  z-index: 10;
  max-width: 1120px;
  margin: 0 auto;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  backdrop-filter: blur(22px);
}
.topbar h1, .section-heading h2, .unlock-card h2 { margin: 2px 0 0; letter-spacing: -.035em; }
.topbar h1 { font-size: clamp(1.5rem, 5vw, 2rem); }
.eyebrow { margin: 0; color: var(--cyan); font-size: .64rem; letter-spacing: .18em; font-weight: 750; }
.top-actions { display: flex; align-items: center; gap: 8px; }

.shell { max-width: 1120px; margin: 0 auto; }
.hero-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0 28px; }
.metric-card, .section-block, .unlock-card {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(18, 42, 57, .9), rgba(8, 23, 35, .86));
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}
.metric-card { min-height: 118px; border-radius: 20px; padding: 16px; display: flex; flex-direction: column; }
.metric-card.accent { border-color: rgba(77, 224, 210, .28); background: linear-gradient(145deg, rgba(21, 70, 75, .82), rgba(8, 30, 39, .9)); }
.metric-card span { color: var(--muted); font-size: .76rem; }
.metric-card strong { font-size: clamp(2rem, 9vw, 3.2rem); line-height: 1; margin: auto 0 5px; }
.metric-card small { color: var(--muted); font-size: .67rem; }

.section-block { border-radius: 24px; padding: 18px; margin: 0 0 16px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.section-heading h2 { font-size: 1.2rem; }
.section-heading time, .section-copy { color: var(--muted); font-size: .72rem; }
.section-copy { margin: -6px 0 16px; line-height: 1.6; }

.machine-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)); gap: 12px; }
.machine-card { border: 1px solid var(--line); border-radius: 18px; background: rgba(4, 16, 25, .55); overflow: hidden; }
.machine-head { padding: 15px; display: flex; justify-content: space-between; gap: 10px; align-items: center; border-bottom: 1px solid var(--line); }
.machine-head h3 { margin: 0; font-size: 1rem; }
.machine-head small { display: block; margin-top: 4px; color: var(--muted); }
.machine-summary-button { width: 100%; border: 0; padding: 15px; color: inherit; background: transparent; text-align: left; font: inherit; cursor: pointer; }
.machine-summary-button:active { background: rgba(255,255,255,.025); }
.machine-health-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.machine-health-head h3 { margin: 0; font-size: 1.18rem; }
.machine-health-head small { display: block; margin-top: 3px; color: var(--muted); }
.machine-health-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 14px; }
.machine-health-metric { border-radius: 12px; padding: 9px 5px; text-align: center; background: rgba(255,255,255,.035); }
.machine-health-metric span { display: block; color: var(--muted); font-size: .63rem; }
.machine-health-metric b { display: block; margin-top: 4px; font-size: 1rem; }
.machine-health-metric.ok b { color: var(--green); }
.machine-health-metric.danger b { color: var(--red); }
.machine-health-metric.pending b { color: var(--muted); }
.machine-mile-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 10px; padding: 11px 12px; border-radius: 12px; background: rgba(255,255,255,.035); }
.machine-mile-total span { color: var(--muted); font-size: .72rem; }
.machine-mile-total strong { font-size: 1.05rem; }
.machine-open-hint { margin-top: 10px; color: var(--muted); font-size: .65rem; text-align: center; }
.machine-workloads { border-top: 1px solid var(--line); }
.workload { padding: 14px 15px; border-bottom: 1px solid var(--line); }
.workload:last-child { border-bottom: 0; }
.workload-title { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.workload-title strong { font-size: .92rem; }
.workload-title code { color: var(--muted); font-size: .68rem; overflow-wrap: anywhere; }
.facet-grid { margin-top: 12px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.facet { min-width: 0; border-radius: 10px; padding: 7px 5px; background: rgba(255,255,255,.035); text-align: center; }
.facet span { display: block; color: var(--muted); font-size: .58rem; overflow: hidden; text-overflow: ellipsis; }
.facet b { display: block; margin-top: 3px; font-size: .64rem; overflow: hidden; text-overflow: ellipsis; }

.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 9px; font-size: .65rem; font-weight: 750; white-space: nowrap; border: 1px solid currentColor; }
.pill.ok { color: var(--green); background: rgba(89, 220, 155, .08); }
.pill.warning { color: var(--amber); background: rgba(255, 196, 92, .08); }
.pill.danger { color: var(--red); background: rgba(255, 113, 133, .08); }
.pill.neutral { color: var(--muted); background: rgba(145, 174, 187, .06); }
.state-ok, .state-running { color: var(--green); }
.state-warning { color: var(--amber); }
.state-blocked, .state-stopped { color: var(--red); }
.state-stale, .state-unknown, .state-not_observed { color: var(--muted); }

.stack-list { display: grid; gap: 9px; }
.stack-item { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: rgba(3, 13, 21, .45); }
.stack-item header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stack-item h3 { margin: 0; font-size: .84rem; }
.stack-item p, .stack-item small { color: var(--muted); font-size: .69rem; line-height: 1.5; }
.stack-item p { margin: 7px 0 0; }
.dense .stack-item { padding: 10px 12px; }
.diff-list { margin-top: 9px; border-top: 1px solid var(--line); padding-top: 8px; }
.diff-list summary { color: var(--cyan); cursor: pointer; font-size: .7rem; }
.diff-list p { overflow-wrap: anywhere; }
.empty-state { padding: 22px 12px; color: var(--muted); text-align: center; border: 1px dashed var(--line); border-radius: 14px; font-size: .78rem; }

.compact-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 10px; align-items: end; }
label { display: grid; gap: 6px; color: var(--muted); font-size: .69rem; }
input, select, textarea {
  width: 100%; min-height: 44px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(2, 12, 20, .75); color: var(--text); padding: 10px 11px; outline: none;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(77, 224, 210, .1); }
.primary-button, .secondary-button, .icon-button, .text-button {
  border: 0; cursor: pointer; color: var(--text); min-height: 44px; border-radius: 12px; padding: 0 14px;
}
.primary-button { background: linear-gradient(135deg, #1ebdb1, #268cea); color: #021216; font-weight: 800; }
.secondary-button { background: rgba(83, 168, 255, .14); border: 1px solid rgba(83, 168, 255, .35); }
.icon-button, .text-button { background: rgba(255,255,255,.055); border: 1px solid var(--line); }
button:disabled { opacity: .38; cursor: not-allowed; }
.form-message, .error-text { min-height: 1.2em; margin: 9px 0; font-size: .72rem; color: var(--muted); }
.error-text { color: var(--red); }
.draft-editor { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 12px; }
.draft-editor summary { cursor: pointer; font-size: .78rem; font-weight: 700; }
.draft-editor form { margin-top: 14px; }

.unlock-card { max-width: 460px; margin: clamp(30px, 12vh, 110px) auto; border-radius: 28px; padding: 28px; text-align: center; }
.unlock-card p { color: var(--muted); line-height: 1.6; font-size: .78rem; }
.unlock-card form { display: grid; gap: 12px; text-align: left; margin-top: 22px; }
.lock-mark { width: 58px; height: 58px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 18px; font-size: 1.7rem; color: var(--cyan); border: 1px solid rgba(77,224,210,.3); background: rgba(77,224,210,.08); }


.quick-nav {
  position: sticky; top: calc(env(safe-area-inset-top) + 70px); z-index: 8;
  display: flex; gap: 6px; margin: -12px 0 16px; overflow-x: auto;
  padding: 7px; border: 1px solid var(--line); border-radius: 16px;
  background: rgba(6, 17, 27, .9); backdrop-filter: blur(18px);
}
.quick-nav a { flex: 1 0 auto; min-width: 72px; color: var(--muted); text-decoration: none; text-align: center; font-size: .72rem; padding: 9px 7px; border-radius: 10px; }
.quick-nav a:active { color: var(--text); background: rgba(77,224,210,.1); }
.filter-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(120px, 1fr); gap: 9px; margin-bottom: 12px; }
.account-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 10px; margin-bottom: 12px; }
.account-card { border: 1px solid var(--line); border-radius: 16px; padding: 13px; background: rgba(3, 13, 21, .48); }
.account-card header, .account-card footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.account-card h3 { margin: 0; font-size: .9rem; }
.account-card small { color: var(--muted); font-size: .65rem; overflow-wrap: anywhere; }
.account-badges { display: flex; gap: 5px; align-items: center; }
.account-meta, .account-note { color: var(--muted); font-size: .7rem; line-height: 1.5; }
.account-note { padding: 8px; border-radius: 10px; background: rgba(255,255,255,.03); }
.mini-facets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0; }
.mini-facets span { display: flex; flex-direction: column; gap: 2px; padding: 7px; border-radius: 9px; background: rgba(255,255,255,.035); color: var(--muted); font-size: .58rem; text-align: center; }
.mini-facets b { font-size: .66rem; }
.small-button { min-height: 36px; padding: 0 10px; font-size: .66rem; }
.wide-field { grid-column: 1 / -1; }
.event-row p { overflow-wrap: anywhere; }
.history-facets { grid-template-columns: repeat(4, 1fr); }
.source-summary { display: grid; gap: 5px; margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); font-size: .68rem; line-height: 1.55; }
.source-summary strong { color: var(--text); }
.history-filter { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); align-items: end; }
.history-query-field { grid-column: span 2; }
.history-template-note { display: grid; gap: 4px; margin: -3px 0 14px; padding: 9px 11px; border-left: 3px solid var(--cyan); background: rgba(77,224,210,.045); color: var(--muted); font-size: .68rem; line-height: 1.5; }
.history-template-note strong { color: var(--amber); }
.history-results-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 17px; }
.history-results-heading h3 { margin: 0; font-size: .92rem; }
.history-trend { margin: 0 0 13px; }
.history-trend-card { padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(3, 13, 21, .45); overflow: hidden; }
.history-trend-card > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.history-trend-card h4 { margin: 3px 0 0; font-size: .8rem; }
.history-trend-overall { display: grid; gap: 2px; margin: 0; text-align: right; color: var(--muted); font-size: .6rem; }
.history-trend-overall strong { color: var(--cyan); font-size: .84rem; }
.history-trend-bars { display: flex; gap: 6px; min-height: 126px; overflow-x: auto; padding: 3px 0 7px; overscroll-behavior-inline: contain; }
.history-trend-bucket { flex: 1 0 38px; min-width: 38px; display: grid; grid-template-rows: 16px 70px 14px 14px; gap: 2px; align-items: end; text-align: center; color: var(--muted); font-size: .55rem; }
.history-trend-rate { color: var(--cyan); font-size: .59rem; font-weight: 750; white-space: nowrap; }
.history-trend-plot { position: relative; display: block; height: 70px; border-bottom: 1px solid var(--line); border-radius: 7px 7px 2px 2px; background: rgba(255,255,255,.025); overflow: hidden; }
.history-trend-bar { position: absolute; right: 7px; bottom: 0; left: 7px; min-height: 0; border-radius: 5px 5px 1px 1px; background: linear-gradient(180deg, var(--cyan), var(--blue)); }
.history-trend-ratio { color: var(--text); font-size: .52rem; white-space: nowrap; }
.history-trend-bucket time { color: var(--muted); font-size: .56rem; }
.history-record footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 9px; }
.history-record footer small { overflow-wrap: anywhere; }
.history-inline-error { margin: 8px 0 0 !important; padding: 8px 9px; border: 1px solid rgba(255,113,133,.32); border-radius: 9px; background: rgba(255,113,133,.07); color: var(--red) !important; }
.history-more { display: block; width: 100%; margin-top: 12px; }
.history-detail { scroll-margin-top: 150px; margin-top: 14px; }
.log-detail-card { border: 1px solid rgba(77, 224, 210, .28); border-radius: 18px; padding: 14px; background: rgba(2, 12, 20, .88); }
.log-detail-card > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.log-detail-card h3 { margin: 3px 0 0; }
.history-provenance { color: var(--muted); font-size: .65rem; overflow-wrap: anywhere; }
.history-fields { display: grid; gap: 7px; margin-top: 12px; }
.history-fields > div { display: grid; gap: 4px; padding: 9px; border-radius: 10px; background: rgba(255,255,255,.035); }
.history-fields b, .conversation-turn b { color: var(--cyan); font-size: .66rem; }
.history-fields span { color: var(--text); font-size: .72rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.history-header-warning { margin: 10px 0 0; padding: 8px 9px; border-radius: 9px; background: rgba(255,196,92,.075); color: var(--amber); font-size: .68rem; }
.conversation-turns { display: grid; gap: 9px; margin-top: 12px; }
.conversation-turn { padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); }
.conversation-turn.is-selected { border-color: rgba(77,224,210,.65); background: rgba(77,224,210,.075); box-shadow: inset 3px 0 0 var(--cyan); }
.conversation-turn header { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .65rem; }
.conversation-turn header > span { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.history-origin-marker { border-radius: 999px; padding: 3px 6px; background: rgba(77,224,210,.12); white-space: nowrap; }
.conversation-turn p { display: grid; gap: 4px; margin: 9px 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .74rem; line-height: 1.55; }
.conversation-turn small { color: var(--muted); overflow-wrap: anywhere; }
.history-thread-truncated { margin: 1px 0 0; padding: 9px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); text-align: center; font-size: .68rem; }

@media (max-width: 620px) {
  .topbar { min-height: 74px; }
  .quick-nav { top: calc(env(safe-area-inset-top) + 64px); margin-top: -8px; }
  .filter-row { grid-template-columns: 1fr; }
  .history-filter { grid-template-columns: 1fr; }
  .history-query-field { grid-column: auto; }
  .history-facets { grid-template-columns: repeat(2, 1fr); }
  .history-record footer { align-items: flex-start; flex-direction: column; }
  .history-record footer button { width: 100%; }
  .history-trend-card { padding: 10px; }
  .history-trend-bucket { flex-basis: 36px; min-width: 36px; }
  .account-list { grid-template-columns: 1fr; }
  .topbar .eyebrow { display: none; }
  .hero-grid { gap: 7px; }
  .metric-card { min-height: 104px; padding: 13px 11px; border-radius: 17px; }
  .metric-card strong { font-size: 2rem; }
  .section-block { padding: 15px; border-radius: 20px; }
  .facet-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .facet { padding: 6px 3px; }
  .top-actions { gap: 5px; }
  .text-button { min-height: 40px; padding: 0 9px; font-size: .68rem; }
  .icon-button { min-height: 40px; padding: 0 12px; }
}

@media (prefers-reduced-motion: no-preference) {
  .section-block, .metric-card { animation: rise .38s ease both; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
}

/* Pinch-zoom.
   iOS positions sticky and fixed elements against the *layout* viewport, not
   the part of the page you can actually see.  Zoom in and the topbar, the
   quick-nav and the ambient blobs stay pinned to a rectangle that is now
   off-screen, so they float over the content at the wrong place and size.
   Nothing in CSS follows the visual viewport, so the page stops pinning while
   a zoom is active - app.js adds `is-zoomed` from the visualViewport scale.
   Zoom is left enabled: this text is small, and reading it is the point. */
body.is-zoomed .topbar,
body.is-zoomed .quick-nav { position: static; }
body.is-zoomed .ambient { display: none; }

/* business の chip だけは状態の下に経過を出す。「ok」だけでは
   最後にマイルを取ったのがいつか分からず、reason は title 属性なので
   スマホでは開けない。 */
.facet-elapsed { display: block; margin-top: 2px; font-style: normal; font-size: .55rem; color: var(--muted); }


.gift-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 8px;
  margin: 12px 0 14px;
}
.gift-summary-card {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.025);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}
.gift-summary-card span { font-size: .65rem; }
.gift-summary-card strong { color: var(--text); font-size: 1.25rem; line-height: 1; }
.gift-summary-card.is-active { border-color: rgba(77,224,210,.65); background: rgba(77,224,210,.08); }
.gift-summary-card.is-active strong { color: var(--cyan); }
.gift-filter-row { grid-template-columns: minmax(130px, 1fr) minmax(150px, 1fr) auto; align-items: end; }
.gift-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(3, 13, 21, .48);
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}
.gift-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .68rem;
}
.gift-table th,
.gift-table td {
  max-width: 300px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid rgba(255,255,255,.035);
  background: rgba(3, 13, 21, .92);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}
.gift-table th { position: sticky; top: 0; z-index: 4; color: var(--muted); background: rgb(7, 21, 32); font-size: .62rem; }
.gift-table tbody tr:last-child td { border-bottom: 0; }
.gift-table tbody tr:hover td { background: rgba(77,224,210,.035); }
.gift-table th:first-child,
.gift-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 126px;
  background: rgb(6, 18, 28);
}
.gift-table th:nth-child(2),
.gift-table td:nth-child(2) {
  position: sticky;
  left: 126px;
  z-index: 3;
  min-width: 104px;
  background: rgb(6, 18, 28);
  box-shadow: 7px 0 10px rgba(0,0,0,.16);
}
.gift-table th:first-child,
.gift-table th:nth-child(2) { z-index: 6; background: rgb(8, 24, 36); }
.gift-date-cell { font-variant-numeric: tabular-nums; color: var(--text); }
.gift-amount-cell { text-align: right !important; font-variant-numeric: tabular-nums; }
.gift-id-cell,
.gift-detail-cell { max-width: 280px !important; white-space: normal !important; overflow-wrap: anywhere; }
.gift-link { color: var(--cyan); font-weight: 700; text-decoration: none; }
.gift-table-empty { padding: 22px !important; color: var(--muted); text-align: center !important; }

@media (max-width: 620px) {
  .gift-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .gift-summary-card { min-height: 64px; padding: 8px; }
  .gift-summary-card span { font-size: .58rem; }
  .gift-summary-card strong { font-size: 1.1rem; }
  .gift-filter-row { grid-template-columns: 1fr; }
  .gift-table { font-size: .64rem; }
  .gift-table th, .gift-table td { padding: 8px; }
  .gift-table th:first-child, .gift-table td:first-child { min-width: 118px; }
  .gift-table th:nth-child(2), .gift-table td:nth-child(2) { left: 118px; min-width: 96px; }
}

.fleet-health-alert { margin: 0 0 12px; border-radius: 14px; padding: 12px 14px; font-weight: 800; font-size: .82rem; }
.fleet-health-alert.danger { color: var(--red); border: 1px solid rgba(255,113,133,.55); background: rgba(255,113,133,.09); }
.health-workload { padding: 13px 15px; border-bottom: 1px solid var(--line); }
.health-workload:last-child { border-bottom: 0; }
.health-workload-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.health-workload-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 4px 0; font-size: .72rem; }
.health-workload-row span { color: var(--muted); }
.health-workload-row b { text-align: right; }

/* Mobile-first health cards: surface business anomalies before technical telemetry. */
.machine-health-card { position: relative; transition: border-color .18s ease, box-shadow .18s ease; }
.machine-health-card.health-ok { border-color: rgba(89,220,155,.27); background: linear-gradient(150deg, rgba(12,46,39,.76), rgba(4,18,25,.78)); }
.machine-health-card.health-danger { border-color: rgba(255,113,133,.5); background: linear-gradient(150deg, rgba(64,20,31,.8), rgba(19,10,18,.9)); box-shadow: 0 14px 42px rgba(114,18,38,.18); }
.machine-health-card.health-pending { border-color: rgba(255,196,92,.28); }
.machine-health-card.is-open { border-color: rgba(83,168,255,.36); }
.machine-summary-button { padding: 17px 16px 13px; }
.machine-name-line { display: flex; align-items: center; gap: 10px; min-width: 0; }
.health-dot { width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto; }
.health-dot.ok { background: var(--green); box-shadow: 0 0 0 4px rgba(89,220,155,.10), 0 0 20px rgba(89,220,155,.28); }
.health-dot.danger { background: var(--red); box-shadow: 0 0 0 4px rgba(255,113,133,.11), 0 0 22px rgba(255,113,133,.35); }
.health-dot.warning { background: var(--amber); box-shadow: 0 0 0 4px rgba(255,196,92,.10); }
.machine-health-state { text-align: right; min-width: 88px; }
.machine-health-state strong { display: block; font-size: .82rem; letter-spacing: -.01em; }
.health-ok .machine-health-state strong { color: var(--green); }
.health-danger .machine-health-state strong { color: var(--red); }
.health-pending .machine-health-state strong { color: var(--amber); }
.machine-health-state small { display: block; margin-top: 3px; color: var(--muted); font-size: .58rem; }
.machine-health-metric { min-height: 56px; display: flex; flex-direction: column; justify-content: center; border: 1px solid transparent; }
.machine-health-metric.ok { background: rgba(89,220,155,.045); }
.machine-health-metric.danger { background: rgba(255,113,133,.09); border-color: rgba(255,113,133,.19); }
.machine-health-metric b { font-size: 1.18rem; line-height: 1; }
.machine-mile-total { padding: 13px 14px; background: rgba(3,14,22,.48); }
.machine-mile-total > div { display: grid; gap: 2px; }
.machine-mile-total small { color: var(--muted); font-size: .56rem; }
.machine-mile-total strong { font-size: 1.2rem; letter-spacing: -.025em; }
.machine-open-hint { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 11px; }
.machine-chevron { display: inline-block; font-size: 1rem; transition: transform .18s ease; }
.machine-health-card.is-open .machine-chevron { transform: rotate(180deg); }
.machine-workloads { background: rgba(0,0,0,.10); }
.health-workload { padding: 14px; }
.health-workload-title { margin-bottom: 0; }
.account-kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 7px; margin-top: 11px; }
.account-kpi { min-width: 0; padding: 9px 7px; border-radius: 11px; background: rgba(255,255,255,.03); text-align: center; }
.account-kpi > span { display: block; color: var(--muted); font-size: .57rem; }
.account-kpi > b { display: block; margin-top: 4px; font-size: .8rem; overflow-wrap: anywhere; }
.account-kpi > small { display: block; margin-top: 4px; color: var(--muted); font-size: .52rem; line-height: 1.25; }
.account-kpi.ok > b { color: var(--green); }
.account-kpi.danger { background: rgba(255,113,133,.08); border: 1px solid rgba(255,113,133,.12); }
.account-kpi.danger > b { color: var(--red); }
.account-kpi.pending > b { color: var(--amber); }
.account-kpi.neutral > b { color: var(--muted); }
.fleet-health-alert.danger { position: relative; padding-left: 39px; box-shadow: 0 10px 34px rgba(114,18,38,.14); }
.fleet-health-alert.danger::before { content: "!"; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; color: #180309; background: var(--red); font-size: .7rem; font-weight: 900; }

@media (max-width: 560px) {
  .section-block { padding: 14px; border-radius: 20px; }
  .machine-list { gap: 10px; }
  .machine-card { border-radius: 17px; }
  .machine-health-head h3 { font-size: 1.13rem; }
  .machine-health-state small { display: none; }
  .machine-health-metrics { margin-top: 13px; }
  .machine-mile-total strong { font-size: 1.13rem; }
  .account-kpi-grid { gap: 5px; }
  .account-kpi { padding: 8px 4px; }
}

/* The hero is an operator summary, not infrastructure telemetry. */
.health-hero-ok { border-color: rgba(89,220,155,.28); }
.health-hero-danger { border-color: rgba(255,113,133,.24); }
.health-hero-mile { border-color: rgba(83,168,255,.24); }
.health-hero .metric-card strong { font-variant-numeric: tabular-nums; }
.health-hero-mile strong { font-size: clamp(1.45rem, 6vw, 2.3rem); white-space: nowrap; }

@media (max-width: 560px) {
  .health-hero { margin-bottom: 18px; gap: 7px; }
  .health-hero .metric-card { min-height: 96px; padding: 12px 10px; border-radius: 16px; }
  .health-hero .metric-card span { font-size: .64rem; }
  .health-hero .metric-card strong { font-size: 1.8rem; }
  .health-hero .health-hero-mile strong { font-size: 1.15rem; }
  .health-hero .metric-card small { font-size: .54rem; line-height: 1.25; }
}


/* Per-PC 7-day business trend: one chart, selectable bot, independent Y axes. */
.machine-trend-panel { margin: 0 18px 18px; padding: 14px; border: 1px solid rgba(124, 181, 203, .18); border-radius: 20px; background: rgba(4, 19, 29, .56); }
.trend-bot-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.trend-bot-chips::-webkit-scrollbar { display: none; }
.trend-bot-chip { appearance: none; border: 1px solid rgba(151, 184, 198, .34); background: rgba(255,255,255,.025); color: var(--muted); border-radius: 999px; padding: 7px 13px; font: inherit; font-size: 12px; font-weight: 700; white-space: nowrap; }
.trend-bot-chip.active { color: #eafcff; border-color: rgba(83, 220, 177, .72); background: rgba(48, 167, 138, .14); }
.machine-trend-body { min-height: 120px; }
.trend-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 2px 2px 8px; }
.trend-head strong { display: block; font-size: 14px; }
.trend-head small { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }
.trend-partial, .trend-complete { font-size: 10px; border-radius: 999px; padding: 4px 8px; white-space: nowrap; }
.trend-partial { color: #f1c27d; background: rgba(197, 137, 56, .12); border: 1px solid rgba(224, 166, 88, .28); }
.trend-complete { color: #7be0bd; background: rgba(55, 167, 128, .10); border: 1px solid rgba(73, 204, 158, .24); }
.trend-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: 10px; margin: 0 2px 2px; }
.trend-legend span { display: inline-flex; align-items: center; gap: 5px; }
.trend-legend i { width: 13px; height: 3px; border-radius: 4px; display: inline-block; }
.trend-legend .primary i { background: #64d7b1; }
.trend-legend .secondary i { background: #6ba9ff; }
.machine-trend-svg { width: 100%; height: auto; min-height: 128px; display: block; overflow: visible; }
.trend-axis { stroke: rgba(181, 207, 218, .30); stroke-width: 1; }
.trend-grid { stroke: rgba(181, 207, 218, .11); stroke-width: 1; stroke-dasharray: 3 5; }
.trend-axis-label { fill: rgba(190, 210, 219, .62); font-size: 17px; }
.trend-x-label { font-size: 15px; }
.trend-left { fill: #76d9bb; }
.trend-right { fill: #83b6ff; }
.trend-line-primary, .trend-line-secondary { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.trend-line-primary { stroke: #64d7b1; }
.trend-line-secondary { stroke: #6ba9ff; }
.trend-dot-primary { fill: #64d7b1; stroke: rgba(5, 24, 34, .92); stroke-width: 2; }
.trend-dot-secondary { fill: #6ba9ff; stroke: rgba(5, 24, 34, .92); stroke-width: 2; }
.trend-waiting { min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 5px; color: var(--muted); }
.trend-waiting strong { color: var(--text); font-size: 14px; }
.trend-waiting span { font-size: 11px; }
@media (max-width: 560px) {
  .machine-trend-panel { margin-left: 12px; margin-right: 12px; padding: 12px 10px 10px; border-radius: 17px; }
  .trend-bot-chip { padding: 6px 11px; font-size: 11px; }
  .trend-axis-label { font-size: 18px; }
  .trend-x-label { font-size: 16px; }
}

.machine-health-metric small { display:block; margin-top:2px; color:var(--muted); font-size:.54rem; font-weight:600; white-space:nowrap; }

.trend-today { display:flex; align-items:center; gap:8px 12px; flex-wrap:wrap; margin:0 2px 9px; padding:8px 10px; border-radius:12px; background:rgba(255,255,255,.035); font-size:10px; }
.trend-today > span { color:var(--muted); font-weight:700; }
.trend-today b { font-size:11px; font-variant-numeric:tabular-nums; }
.trend-today b.primary { color:#76d9bb; }
.trend-today b.secondary { color:#83b6ff; }
.trend-today small { color:var(--amber); margin-left:auto; }

.reply-review-toolbar { display:flex; justify-content:flex-end; margin:8px 0 4px; }
.reply-review-toolbar label { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:.72rem; }
.reply-review-toolbar select { width:auto; min-width:82px; padding:7px 28px 7px 10px; }

.pill.tiny-pill { font-size: 0.68rem; padding: 0.05rem 0.4rem; margin-right: 0.35rem; }
.form-note { margin: 0.25rem 0 0; font-size: 0.75rem; opacity: 0.75; }

/* アカウント一覧は件数が多いのでテーブル。長いIDは画面に出さない。 */
.account-count { margin: 0.25rem 0 0.5rem; font-size: 0.8rem; opacity: 0.8; }
.chip-filter { display: flex; gap: 0.5rem; align-items: flex-start; margin-bottom: 0.4rem; }
.chip-label { flex: 0 0 3.2rem; font-size: 0.75rem; opacity: 0.7; padding-top: 0.3rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.3rem; flex: 1 1 auto; }
.chip-row.scroll-chips { max-height: 4.6rem; overflow-y: auto; }
.chip { border: 1px solid rgba(255,255,255,0.18); background: transparent; color: inherit;
  border-radius: 999px; padding: 0.18rem 0.6rem; font-size: 0.78rem; cursor: pointer; }
.chip-on { background: rgba(80,200,160,0.22); border-color: rgba(80,200,160,0.7); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dense-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.dense-table tbody tr { cursor: pointer; }
.dense-table th { text-align: left; font-weight: 600; opacity: 0.65; font-size: 0.72rem;
  padding: 0.3rem 0.4rem; border-bottom: 1px solid rgba(255,255,255,0.12); white-space: nowrap; }
.dense-table td { padding: 0.35rem 0.3rem; border-bottom: 1px solid rgba(255,255,255,0.06);
  vertical-align: top; }
.dense-table td { white-space: nowrap; }
.note-dot { display: inline-block; border-radius: 4px; padding: 0 0.25rem; font-size: 0.65rem;
  border: 1px solid currentColor; vertical-align: middle; }
.note-operator { color: #7fe3bf; }
.note-source { opacity: 0.6; }
.cell-sub { font-size: 0.68rem; opacity: 0.6; }
.state-cell { white-space: nowrap; }
.account-ledger-detail { margin-top: 0.75rem; padding: 0.7rem 0.8rem; border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; }
.account-ledger-detail header { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.account-ledger-detail h3 { margin: 0; font-size: 0.85rem; }
.account-ledger-detail summary { cursor: pointer; margin-top: 0.45rem; font-size: 0.75rem; }
.account-ledger-detail p { margin: 0.3rem 0 0; overflow-wrap: anywhere; white-space: normal; }
.account-ledger-summary { font-size: 0.75rem; }
.mini-state { display: inline-block; min-width: 1.35rem; text-align: center; border-radius: 4px;
  padding: 0.08rem 0.2rem; margin-right: 0.15rem; font-size: 0.7rem; font-weight: 700; }
.danger-text { color: #ff8a8a; font-weight: 700; }
.empty-cell { text-align: center; opacity: 0.6; padding: 1rem 0; }
.row-open { opacity: 0.45; text-align: right; font-size: 1rem; }

/* T-74 JMAC machine registry. This is deliberately separate from Fleet health. */
.machine-registry-toolbar { grid-template-columns: minmax(180px, 1fr) auto; align-items: end; }
.machine-retired-toggle,
.machine-target-toggle { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; min-height: 40px; }
.machine-retired-toggle input,
.machine-target-toggle input { width: auto; min-width: 18px; height: 18px; margin: 0; }
.machine-registry-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.machine-registry-card { appearance: none; width: 100%; min-width: 0; display: grid; gap: 9px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: rgba(3,13,21,.48); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.machine-registry-card:hover { border-color: rgba(77,224,210,.35); }
.machine-registry-entry { min-width: 0; display: grid; gap: 6px; }
.machine-bot-inventory { display: grid; gap: 3px; margin: 10px 0; font-size: .75rem; }
.machine-bot-inventory small { color: var(--muted); font-weight: 400; }
.machine-bot-inventory > span { color: var(--cyan); }
.machine-registry-card.is-selected { border-color: rgba(77,224,210,.72); box-shadow: inset 3px 0 0 var(--cyan); background: rgba(77,224,210,.055); }
.machine-registry-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.machine-registry-head > span:first-child { min-width: 0; display: grid; gap: 3px; }
.machine-registry-head strong { font-size: .98rem; overflow-wrap: anywhere; }
.machine-registry-head small { color: var(--muted); font-size: .66rem; overflow-wrap: anywhere; }
.machine-registry-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.machine-registry-meta { color: var(--muted); font-size: .64rem; line-height: 1.45; overflow-wrap: anywhere; }
.machine-registry-editor,
.machine-registry-create { margin-top: 14px; }
.machine-registry-editor .compact-form,
.machine-registry-create .compact-form { align-items: end; }

@media (max-width: 620px) {
  .machine-registry-toolbar { grid-template-columns: 1fr; }
  .machine-registry-list { grid-template-columns: 1fr; }
  .machine-registry-card { padding: 12px; border-radius: 14px; }
  .machine-registry-head { align-items: flex-start; }
  .machine-registry-head > .pill { flex: 0 0 auto; }
  .machine-registry-editor .compact-form,
  .machine-registry-create .compact-form { grid-template-columns: 1fr; }
  .machine-registry-editor button,
  .machine-registry-create button { width: 100%; }
}


/* YYC prefecture capacity: one projection, desktop table + iPhone card layout. */
.yyc-capacity-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; margin: 0 0 12px; }
.yyc-capacity-metric { min-width: 0; display: grid; gap: 3px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); }
.yyc-capacity-metric span { color: var(--muted); font-size: .6rem; }
.yyc-capacity-metric b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.yyc-capacity-metric.ok b { color: var(--cyan); }
.yyc-capacity-metric.warning b { color: var(--amber); }
.yyc-capacity-metric.danger b { color: var(--red); }
.yyc-prefecture-warning { margin: 0 0 10px; padding: 9px 10px; border: 1px solid rgba(255,196,92,.32); border-radius: 10px; background: rgba(255,196,92,.07); color: var(--amber); font-size: .68rem; line-height: 1.45; }
.yyc-prefecture-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.yyc-prefecture-table { width: 100%; min-width: 940px; border-collapse: collapse; font-size: .72rem; font-variant-numeric: tabular-nums; }
.yyc-prefecture-table th { padding: 7px 6px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .62rem; font-weight: 650; text-align: right; white-space: nowrap; }
.yyc-prefecture-table th:first-child { text-align: left; }
.yyc-prefecture-table td { padding: 7px 6px; border-bottom: 1px solid rgba(255,255,255,.055); text-align: right; white-space: nowrap; }
.yyc-prefecture-table td.prefecture-name { color: var(--text); font-weight: 750; text-align: left; }
.yyc-prefecture-table td.confirmed { color: var(--cyan); font-weight: 750; }
.yyc-prefecture-table td.unconfirmed, .yyc-prefecture-table td.held, .yyc-prefecture-table td.stalled { color: var(--amber); font-weight: 750; }
.yyc-prefecture-table td.banned, .yyc-prefecture-table td.down { color: var(--red); font-weight: 750; }
.yyc-prefecture-table td.prefecture-gap { font-weight: 800; }
.yyc-prefecture-table td.shortage { color: var(--amber); }
.yyc-prefecture-table td.met { color: var(--cyan); }
.yyc-prefecture-table td.over { color: var(--blue); }
.yyc-prefecture-note { margin-top: 9px; }

@media (max-width: 620px) {
  .yyc-capacity-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .yyc-capacity-metric { padding: 8px; border-radius: 10px; }
  .yyc-capacity-metric b { font-size: .98rem; }
  .yyc-prefecture-table-wrap { overflow: visible; }
  .yyc-prefecture-table { display: block; min-width: 0; font-size: .7rem; }
  .yyc-prefecture-table thead { display: none; }
  .yyc-prefecture-table tbody { display: grid; gap: 9px; }
  .yyc-prefecture-table tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: rgba(3,13,21,.46); }
  .yyc-prefecture-table td { min-width: 0; padding: 5px 6px; border: 0; border-radius: 8px; background: rgba(255,255,255,.025); text-align: right; white-space: normal; }
  .yyc-prefecture-table td::before { content: attr(data-label); display: block; margin-bottom: 2px; color: var(--muted); font-size: .52rem; font-weight: 500; }
  .yyc-prefecture-table td.prefecture-name { grid-column: span 2; font-size: .9rem; background: transparent; }
  .yyc-prefecture-table td.prefecture-name::before { content: "都道府県"; }
  .yyc-prefecture-table td.prefecture-gap { grid-column: span 2; font-size: .84rem; }
}
/* Daily restriction history remains readable at phone width without a chart library. */
.ban-day-grid { display: grid; grid-template-columns: repeat(14, minmax(25px, 1fr)); gap: 5px; min-width: 440px; align-items: end; }
.ban-day { text-align: center; font-size: .72rem; }
.ban-day-bar { display: flex; align-items: end; justify-content: center; height: 92px; margin: 8px 0; }
.ban-day-bar span { width: 70%; min-height: 2px; background: var(--accent, #61d6b3); border-radius: 4px 4px 0 0; }
.ban-day-bar span.missing { background: none; border-bottom: 1px dashed #607481; }
.ban-day small { display: block; }
@media (max-width: 620px) {
  .ban-day-grid { min-width: 0; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px 6px; }
}

/* The account editor reuses a packaged grid; no external CDN or second ledger. */
#account-pc-summary td:last-child { white-space: normal; min-width: 200px; max-width: 420px; line-height: 1.6; }
#accounts, #account-table { scroll-margin-top: 170px; }
#accounts { overflow: hidden; }
#account-grid { border-radius: 5px; font-size: 13px; background: #fff; color: #162a35; }
#account-grid .tabulator-header { background: #185b6b; color: #fff; }
#account-grid .tabulator-col { background: #185b6b; }
#account-grid .tabulator-header input { color: #152f3a; background: #fff; border: 1px solid #a7c8d2; min-height: 28px; padding: 4px; font-size: 12px; }
#account-grid .tabulator-cell { border-right: 1px solid #dae2e5; min-height: 34px; padding: 7px; }
#account-grid .tabulator-cell.account-grid-observed { background: #edf3f5; }
#account-grid .tabulator-cell.tabulator-editing { background: #fff; }
#account-grid .tabulator-cell input, #account-grid .tabulator-cell textarea { background: #fff; color: #172e38; padding: 2px; min-height: 25px; border: 0; }
#account-grid button { color: #174c5d; font-size: 12px; background: #e9f3f6; border: 1px solid #a7c8d2; padding: 4px; border-radius: 3px; }
.tabulator-edit-list { color: #172e38; background: #fff; }
#accounts .inline-check { display: flex; align-items: center; gap: 7px; }
#accounts input[type=checkbox] { width: 18px; min-height: 18px; height: 18px; padding: 0; }
@media (min-width: 1200px) {
  body:has(#accounts:target) .shell, body:has(#accounts:target) .topbar { max-width: min(96vw, 2000px); }
}

body:has(#account-grid) .topbar { background: rgba(6,17,27,.96); }

#account-grid .account-photos { display:flex; flex-wrap:wrap; gap:4px; min-height:50px; white-space:normal; }
#account-grid .account-photos img { width:58px; height:58px; object-fit:contain; background:#f3f5f6; }
#account-grid .account-photos .account-photo-thumb { position:relative; display:inline-flex; padding:0; width:auto; border:2px solid transparent; border-radius:4px; background:none; cursor:pointer; }
#account-grid .account-photos .account-photo-ng { border-color:#b42318; }
#account-grid .account-photos .account-photo-ng-mark { position:absolute; inset:0; display:grid; place-items:center; color:#fff; font-size:42px; font-weight:900; line-height:1; text-shadow:0 2px 3px #670000; background:rgba(130,0,0,.28); pointer-events:none; }
#account-grid .account-photos .account-photo-ng-badge { position:absolute; top:0; left:0; padding:1px 3px; color:#fff; background:#b42318; font-size:11px; font-weight:800; pointer-events:none; }
#account-grid .account-photos button { display:block; width:100%; white-space:normal; font-size:11px; }
#account-grid .account-photos.drag-over { outline:2px solid #288a7d; background:#def9f1; }
#account-grid .tabulator-row.account-grid-draft { outline:2px solid #c79524; outline-offset:-2px; }
#account-grid .tabulator-row.account-grid-draft .tabulator-cell { background:#fff9e8; }
#account-grid .account-image-cell:focus { outline:2px solid #288a7d; outline-offset:-2px; }
.account-image-dialog { max-width:min(90vw,760px); max-height:90vh; padding:20px; border:1px solid #a7c8d2; border-radius:10px; color:#172e38; }
.account-image-dialog::backdrop { background:rgba(6,17,27,.75); }
.account-image-dialog img { display:block; max-width:100%; max-height:65vh; object-fit:contain; margin:auto; }
.account-image-dialog p { margin:12px 0; }
.account-image-dialog-actions { display:flex; justify-content:flex-end; gap:10px; }
.account-image-dialog-actions button { width:auto; padding:8px 14px; }
.account-image-dialog-actions .danger { background:#b42318; color:#fff; border-color:#b42318; }
#account-grid .account-registration-menu { width:100%; min-height:30px; background:#fff; color:#172e38; border:1px solid #a7c8d2; border-radius:3px; }
#account-grid .account-registration-menu-box { display:grid; gap:5px; white-space:normal; }
#account-grid .account-registration-readiness { padding:4px 6px; border-radius:4px; font-size:11px; line-height:1.35; font-weight:700; white-space:normal; overflow-wrap:anywhere; }
#account-grid .account-registration-readiness.is-error { background:#fde8e8; color:#8d1f1f; border:1px solid #e0aaaa; }
#account-grid .account-registration-readiness.is-warn { background:#fff4cf; color:#6e5200; border:1px solid #dbc26b; }
#account-grid .account-registration-readiness.is-complete { background:#e4f6ec; color:#17633b; border:1px solid #9bcbb0; }
.account-grid-paste-hint { margin:8px 0; padding:10px 12px; border:1px dashed #c79524; border-radius:8px; background:#fff9e8; color:#6a4b00; font-weight:700; cursor:text; }
.account-grid-paste-hint:focus, .account-grid-paste-hint.is-armed { outline:2px solid #c79524; outline-offset:2px; background:#fff2c7; }
.registration-image-preview { width:96px; height:96px; object-fit:contain; margin-top:7px; border:1px solid var(--line); border-radius:8px; background:#f3f5f6; }
