:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  color: #172523;
  background: #f8f7f2;
  --muted: #48605a;
  --line: #d5ddd3;
  --amber: #f5c780;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid #956218; outline-offset: 3px; }
.shell { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.topbar { background: #0b1c23; color: #f2f7ed; }
.nav { min-height: 68px; display: flex; align-items: center; gap: 20px; }
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; font-weight: 760; letter-spacing: -.035em; }
.mark { display: flex; align-items: end; justify-content: center; gap: 2px; width: 32px; height: 32px; padding: 7px; border-radius: 8px; background: #25453e; }
.mark i { width: 4px; height: 6px; background: var(--amber); border-radius: 1px; }
.mark i:nth-child(2) { height: 11px; }
.mark i:nth-child(3) { height: 16px; }
main { padding-block: clamp(28px, 5vw, 65px); }
#status { margin: 0 0 20px; color: #514322; background: #f6e8c9; padding: 12px 16px; border-radius: 8px; overflow-wrap: anywhere; }
#status:empty { display: none; }

h1, h2, h3 { margin: 0; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.65rem); line-height: 1.04; letter-spacing: -.055em; }
h2 { font-size: 1.35rem; letter-spacing: -.03em; }
h3 { font-size: .95rem; }
p { color: var(--muted); line-height: 1.55; }
button, input { font: inherit; }
button { min-height: 44px; padding: 8px 14px; border-radius: 7px; font-weight: 730; cursor: pointer; }
button:disabled { opacity: .6; cursor: wait; }
.primary { border: 1px solid #ddaa59; color: #30230f; background: var(--amber); }
.primary:hover:not(:disabled) { background: #ffda9e; }
.secondary { border: 1px solid #a8bbb0; color: #264536; background: #fdfdf8; }
.secondary:hover:not(:disabled) { background: #e8efe5; }
input { width: 100%; min-width: 0; min-height: 44px; padding: 8px 11px; color: #182c27; background: #fff; border: 1px solid #adbbb1; border-radius: 7px; }
label { display: block; margin-bottom: 7px; font-size: .88rem; font-weight: 720; }
.inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.inline-form button { white-space: nowrap; }
small { color: var(--muted); }

.sign-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); overflow: hidden; min-height: 425px; border: 1px solid var(--line); border-radius: 14px; background: #fffef9; }
.sign-in-art { background: #163438 url('../assets/cinderfall-relay.webp') 70% 50% / cover no-repeat; }
.sign-in-form { align-self: center; padding: clamp(24px, 4.8vw, 64px); }
.sign-in-form > p { margin: 16px 0 28px; }
#google { width: 100%; margin-bottom: 20px; }
.workspace-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 28px; }
#identity { margin: 8px 0 0; overflow-wrap: anywhere; }
.workspace-heading > div { min-width: 0; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; gap: 20px; }
.card { padding: clamp(18px, 2.5vw, 29px); border: 1px solid var(--line); border-radius: 12px; background: #fffef9; }
.card > p { margin: 8px 0 14px; font-size: .93rem; }
.upload-form { margin: 22px 0 10px; }
.upload-form small { display: block; margin-top: 7px; }
.rows { list-style: none; display: grid; padding: 0; margin: 14px 0 0; }
.rows li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.row-name { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.row-actions { display: flex; gap: 6px; }
.row-actions button { min-height: 38px; padding: 6px 9px; font-size: .84rem; }
.row-actions .delete { color: #7a3026; }
#more { margin-top: 10px; }
.credits .balance { margin: 11px 0 24px; color: #255748; font-size: 2.7rem; line-height: 1.15; font-weight: 750; font-variant-numeric: tabular-nums; }
.delta { font-family: ui-monospace, monospace; font-weight: 700; }

@media (max-width: 730px) {
  .workspace-grid, .sign-in { grid-template-columns: minmax(0, 1fr); }
  .sign-in { min-height: 0; }
  .sign-in-art { min-height: 145px; background-position: 70% 42%; }
  .nav { gap: 12px; }
  .nav > a:not(.brand) { font-size: .89rem; }
}
@media (max-width: 420px) {
  .shell { width: calc(100% - 28px); }
  .sign-in-form .inline-form { grid-template-columns: minmax(0, 1fr); }
  .assets .rows li { align-items: start; flex-direction: column; }
}
