:root {
    color-scheme: light;
    --canvas: #faf7ef;
    --paper: #fff;
    --ink: #2d2114;
    --muted: #655645;
    --line: #e9dec9;
    --gold: #f2c550;
    --gold-dark: #7a5015;
    --warm: #fff3d4;
    --radius: 22px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 1rem/1.5 "Segoe UI", system-ui, sans-serif; }
h1, h2, p, dl, dd { margin: 0; }
h1, h2 { line-height: 1.15; letter-spacing: -.035em; overflow-wrap: anywhere; }
button, input { font: inherit; }
button { min-height: 46px; cursor: pointer; border-radius: 12px; border: 1px solid transparent; padding: 10px 18px; font-weight: 650; }
button:disabled { opacity: .6; cursor: wait; }
:focus-visible { outline: 3px solid #8f600d; outline-offset: 3px; }
.top { background: var(--paper); border-bottom: 1px solid var(--line); }
.top-inner, main { width: min(1120px, 100% - 48px); margin-inline: auto; }
.top-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; gap: 10px; align-items: center; font-weight: 720; letter-spacing: -.02em; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--gold); }
.brand-mark::before { content: ''; width: 14px; height: 9px; border: 2px solid #4b2d0b; border-radius: 3px; box-shadow: 0 4px 0 -2px #6d4710; }
main { padding-block: clamp(32px, 7vw, 88px); }
.access { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); min-height: 440px; border-radius: 28px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 16px 48px #432b1316; }
.access-intro { display: grid; align-content: end; gap: 18px; min-height: 300px; padding: clamp(28px, 5vw, 58px); color: #382510; background: radial-gradient(ellipse at 96% 4%, #fff3ae 0%, transparent 65%), linear-gradient(138deg, #f8d875, #eab042); }
.access-intro h1 { font-size: clamp(2.4rem, 5.4vw, 4.65rem); line-height: 1.02; letter-spacing: -.065em; max-width: 9ch; }
.access-intro p { color: #4c3416; max-width: 28ch; font-size: 1.06rem; }
.access-body { display: grid; align-content: center; gap: 22px; padding: clamp(24px, 5vw, 58px); }
.access-body h2 { font-size: 1.65rem; }
.access-body h2 + p { color: var(--muted); margin-top: 8px; }
.access input { box-sizing: border-box; display: block; width: 100%; background: #fffcf5; color: var(--ink); border: 1px solid #9f8c6b; border-radius: 12px; min-height: 48px; margin-top: 7px; padding: 10px 12px; }
.access label { font-weight: 650; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.primary { background: var(--gold); color: #34220d; }
.primary:hover { background: #eab638; }
.secondary { background: var(--paper); color: var(--gold-dark); border-color: #b6a384; }
.secondary:hover { background: var(--warm); }

.access-intro { overflow: hidden; position: relative; isolation: isolate; }
.access-intro::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 95%;
    aspect-ratio: 1;
    inset: -50% -52% auto auto;
    border-radius: 50%;
    border: 1px solid #6b47052b;
    box-shadow: 0 0 0 24px #fff9d44f, 0 0 0 25px #6b470522, 0 0 0 50px #fff9d433, 0 0 0 51px #6b47051f;
    pointer-events: none;
}
@media (max-width: 720px) {
    .top-inner, main { width: calc(100% - 32px); }
    main { padding-block: 24px 40px; }
    .access { grid-template-columns: minmax(0, 1fr); min-height: 0; border-radius: 20px; }
    .access-intro { min-height: 0; padding: 28px 24px; }
    .access-intro h1 { max-width: 13ch; }
}
@media (max-width: 420px) {
    .actions > button { flex: 1 1 100%; }
}


.device-usage { margin-top: 16px; }
.usage-dialog {
    width: min(660px, calc(100% - 32px));
    max-height: calc(100% - 32px);
    padding: clamp(16px, 4vw, 26px);
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.usage-dialog::backdrop { background: #28190680; }
.usage-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.usage-summary { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; }
.usage-summary div, .usage-log li { background: var(--canvas); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.usage-summary dt, .usage-sync { color: var(--muted); font-size: .9rem; }
.usage-summary dd { margin-top: 3px; font-weight: 650; }
.usage-sync { margin-top: 12px; }
.usage-log { margin: 14px 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.usage-log li { display: grid; gap: 4px; }
.usage-log li span { color: var(--muted); font-size: .92rem; }
