:root {
  color-scheme: light;
  --ink: #10233f;
  --muted: #66738a;
  --line: #d9e0e9;
  --paper: #f6f8fb;
  --card: #ffffff;
  --mint: #73d8c7;
  --coral: #ff997b;
  --navy: #10233f;
  --shadow: 0 18px 60px rgba(16, 35, 63, 0.1);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 100% 0%, rgba(115, 216, 199, 0.2), transparent 30rem), var(--paper);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.shell { width: min(100% - 32px, 960px); margin: 0 auto; padding: env(safe-area-inset-top) 0 34px; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 82px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font-weight: 800; letter-spacing: -0.03em; text-decoration: none; }
.brand img { border-radius: 13px; box-shadow: 0 5px 14px rgba(16, 35, 63, .16); }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 14px; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.03; letter-spacing: -0.055em; }
h2 { margin-bottom: 5px; font-size: 1.16rem; letter-spacing: -0.02em; }
.eyebrow { margin-bottom: 8px; color: #e06d55; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.lede { max-width: 510px; margin-bottom: 26px; color: var(--muted); font-size: 1.02rem; }
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 34px 0 28px; }
.hero-row h1 { max-width: 660px; margin-bottom: 0; }
.session-pill, .badge { border-radius: 999px; background: #e6f6f2; color: #287f73; font-size: .72rem; font-weight: 750; padding: 7px 11px; white-space: nowrap; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel { border: 1px solid rgba(217, 224, 233, .9); border-radius: 22px; background: rgba(255, 255, 255, .9); box-shadow: var(--shadow); padding: 24px; }
.panel--accent { background: linear-gradient(145deg, #10233f, #1a3a5c); color: #fff; border: 0; }
.panel--accent .eyebrow { color: var(--mint); }
.panel--accent .muted, .panel--accent .form-message { color: #c5d0df; }
.auth-panel { width: min(100%, 510px); margin: 60px auto 0; padding: clamp(25px, 7vw, 48px); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.muted, .hint { color: var(--muted); }
.hint { font-size: .78rem; }
.optional { color: var(--muted); font-weight: 400; }
.stack { display: grid; gap: 9px; }
label { font-size: .82rem; font-weight: 750; }
input, textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfe; color: var(--ink); padding: 11px 12px; outline: none; resize: vertical; }
input:focus, textarea:focus { border-color: #66caba; box-shadow: 0 0 0 3px rgba(115, 216, 199, .2); }
.button { min-height: 42px; border: 1px solid transparent; border-radius: 11px; padding: 9px 14px; font-weight: 750; transition: transform .15s ease, opacity .15s ease, background .15s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .55; transform: none; }
.button--primary { background: var(--coral); color: #fff; box-shadow: 0 7px 16px rgba(224, 109, 85, .2); }
.button--quiet { border-color: var(--line); background: transparent; color: var(--ink); }
.panel--accent .button--quiet { border-color: rgba(255,255,255,.25); color: #fff; }
.button-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.form-message { min-height: 22px; margin: 6px 0 0; color: #b34c37; font-size: .86rem; }
.panel--accent .form-message.success, .form-message.success { color: #277f6f; }
.status-dot { width: 11px; height: 11px; margin-top: 5px; border-radius: 50%; background: #ffcc74; box-shadow: 0 0 0 5px rgba(255, 204, 116, .16); }
.status-dot.on { background: var(--mint); box-shadow: 0 0 0 5px rgba(115, 216, 199, .18); }
.copy-field { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; background: #f7f9fc; padding: 9px 10px; }
.copy-field code { min-width: 0; flex: 1; overflow: hidden; color: var(--ink); font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.copy-button { border: 0; border-radius: 7px; background: #e7edf5; color: var(--ink); padding: 5px 8px; font-size: .72rem; font-weight: 750; }
.copy-button:hover { background: #dbe5f0; }
.notes-section { margin-top: 30px; }
.notes-list { display: grid; gap: 10px; }
.note-card { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; width: 100%; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); padding: 15px 16px; text-align: left; box-shadow: 0 7px 24px rgba(16, 35, 63, .05); }
.note-card:hover { border-color: #9acfc6; }
.note-card h3 { overflow: hidden; margin: 0 0 3px; font-size: .98rem; text-overflow: ellipsis; white-space: nowrap; }
.note-card p { overflow: hidden; margin: 0; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.note-card time { color: var(--muted); font-size: .74rem; white-space: nowrap; }
.empty { border: 1px dashed #bfcbd9; border-radius: 16px; color: var(--muted); padding: 28px 20px; text-align: center; }
.back-link { border: 0; background: none; color: #d86c54; padding: 0; font-weight: 750; }
.note-detail { max-width: 720px; margin: 34px auto 0; }
.note-detail h1 { margin-top: 22px; font-size: clamp(1.8rem, 5vw, 2.8rem); }
.detail-block { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.detail-label { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.detail-value { margin: 10px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.payload { overflow: auto; margin: 10px 0 0; border-radius: 12px; background: #f2f5f8; padding: 13px; color: #29425f; font: .78rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
footer { margin: 34px 0 0; color: #95a1b1; font-size: .76rem; text-align: center; }
.toast { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); left: 16px; z-index: 10; border-radius: 12px; background: var(--ink); color: #fff; opacity: 0; padding: 12px 15px; pointer-events: none; text-align: center; transform: translateY(10px); transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 680px) {
  .shell { width: min(100% - 24px, 960px); }
  .topbar { min-height: 70px; }
  .grid { grid-template-columns: 1fr; }
  .hero-row { align-items: flex-start; flex-direction: column; margin-top: 28px; }
  .panel { padding: 20px; border-radius: 18px; }
  .note-card { grid-template-columns: 1fr; }
  .note-card time { justify-self: start; }
}
