:root {
  color-scheme: light;
  --ink: #173847;
  --muted: #526d79;
  --teal: #116477;
  --line: #cfdee3;
  font: 16px/1.65 "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif;
  color: var(--ink);
  background: #f3f8fa;
}
* { box-sizing: border-box; }
body, p, h1, h2, dl, dd { margin: 0; }
.wrap { width: min(100% - 36px, 1010px); margin: 0 auto; }
.top { background: #fff; border-bottom: 1px solid var(--line); }
.bar, .brand, .panel-head, .actions, .account-head { display: flex; align-items: center; gap: 10px; }
.bar { min-height: 60px; justify-content: space-between; }
.brand { font-size: 15px; font-weight: 750; }
a { color: var(--teal); text-underline-offset: .22em; font-weight: 700; }
.bar a { font-size: 13px; text-decoration: none; }
.intro { padding: 28px 0 18px; }
.eyebrow { color: var(--teal); font-size: 13px; font-weight: 750; }
.eyebrow span { margin: 0 5px; color: #8dabb3; }
h1 { font-size: clamp(26px, 4.4vw, 38px); line-height: 1.35; margin: 5px 0; }
h2 { font-size: 18px; line-height: 1.5; }
.intro > p:last-child, .note, .access p, .account p { color: var(--muted); }
.intro > p:last-child, .account p, .access p, .panel-body { font-size: 14px; }
.layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(240px, 1fr); gap: 16px 20px; align-items: start; padding-bottom: 40px; }
aside { display: grid; gap: 16px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 4px 20px #14354106; overflow: hidden; }
.composer { border-top: 3px solid var(--teal); }
.panel-head, .account-head { justify-content: space-between; gap: 8px; }
.panel-head { padding: 14px 20px; border-bottom: 1px solid var(--line); }
.pill { display: inline-block; padding: 3px 9px; background: #e9f1f4; color: #385a69; border-radius: 30px; font-size: 12px; font-weight: 700; }
.pill[data-kind="progress"] { background: #e3f1fd; color: #1d597b; }
.pill[data-kind="attention"] { background: #fff1d8; color: #805714; }
.pill[data-kind="success"] { background: #ddf3e8; color: #246044; }
.access, .account, form, .panel-body { padding: 17px 20px; }
.account { grid-column: 1 / -1; }
.account-head { align-items: flex-start; }
.account p, .access p { margin: 4px 0; }
#login-progress { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
#login-message, #result, .note { overflow-wrap: anywhere; white-space: pre-line; }
.field + .field { margin-top: 14px; }
#restore-local { margin-bottom: 12px; }
label { display: block; margin-bottom: 4px; font-weight: 700; font-size: 14px; }
label span { color: var(--muted); font-size: 12px; font-weight: 500; }
input, textarea { display: block; width: 100%; min-width: 0; color: var(--ink); background: #fcfefe; border: 1px solid #a8c3cd; border-radius: 8px; font: inherit; line-height: 1.55; padding: 9px 11px; }
input::placeholder, textarea::placeholder { color: #66818c; }
textarea { resize: vertical; min-height: 8.5em; }
:focus-visible { outline: 3px solid #2794ab; outline-offset: 3px; }
.actions { margin-top: 10px; flex-wrap: wrap; }
.editor-actions { justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 15px; margin-top: 16px; }
button, .action-link { display: inline-flex; align-items: center; justify-content: center; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; min-height: 42px; padding: 7px 14px; border-radius: 8px; text-decoration: none; }
button:disabled { opacity: .55; cursor: default; }
.primary { color: white; border: 1px solid var(--teal); background: var(--teal); }
.primary:enabled:hover, a.primary:hover { background: #104f5d; }
.secondary { color: var(--teal); background: #fff; border: 1px solid #a8c7d1; }
.secondary:enabled:hover { background: #edf6f7; }
.full { width: 100%; margin-top: 12px; }
.action-link, #gate-retry { margin: 8px 0 2px; }
dl > div { display: flex; justify-content: space-between; gap: 10px; margin: 3px 0; }
dt { color: var(--muted); }
dd { font-weight: 700; text-align: right; }
.note { display: block; font-size: 12px; margin-top: 6px; }
.note:empty { display: none; }
.result-link { display: inline-block; margin: 8px 0; }
[hidden] { display: none !important; }
@media (max-width: 700px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .intro { padding: 19px 0 14px; }
  form, .panel-head, .panel-body, .access, .account { padding-inline: 15px; }
}
@media (max-width: 420px) {
  .wrap { width: calc(100% - 22px); }
  .brand { font-size: 13px; gap: 6px; }
  .editor-actions button { flex: 1 1 auto; }
}
