/* Æramyd Notes — Midnight and Iris */

:root {
  --midnight: #0B1020; --ink: #1E2438; --mist: #9AA0B4; --porcelain: #F5F6FA; --iris: #5546FF; --iris-deep: #3F31D9;
  --bg: #F5F6FA; --surface: #FFFFFF; --surface-2: #E9EBF2; --line: #E3E5EE; --text: #0B1020; --muted: #565D72;
  --accent: #5546FF; --accent-soft: #EEEDFF; --page: #FFFFFF; --rule: #DCE0EA; --margin: #F1C9CF; --danger: #C4320A;
  --shadow: 0 8px 28px rgba(11, 16, 32, .10);
  --radius: 16px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sp: 32px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
html[data-theme="dark"], .theme-dark {
  --bg: #0B1020; --surface: #1E2438; --surface-2: #2A3150; --line: #2E3550; --text: #F5F6FA; --muted: #9AA0B4;
  --accent-soft: #24245A; --page: #11172A; --rule: #283052; --margin: #4D2D3C; --danger: #FF8A65;
  --shadow: 0 8px 28px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 16px; overscroll-behavior: none; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }

.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ic.sm { width: 18px; height: 18px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

.screen { position: fixed; inset: 0; display: flex; background: var(--bg); color: var(--text); }

/* ---------- buttons ---------- */
.btn { height: 50px; padding: 0 20px; border-radius: 14px; border: 1px solid transparent; font-size: 16px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--surface-2); }
.btn.block { width: 100%; }
.btn.primary { background: var(--accent); color: #FFFFFF; }
.btn.primary:hover { background: var(--iris-deep); }
.btn.outline { background: transparent; border-color: var(--line); }
.btn.dark { background: var(--text); color: var(--bg); }
.btn.small { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn.link { background: transparent; color: var(--accent); height: 44px; font-weight: 500; }
.btn.link.light { color: var(--muted); }
.btn:disabled { opacity: .55; cursor: default; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: none; background: transparent; display: inline-flex; align-items: center; justify-content: center; color: var(--text); }
.icon-btn.outline { border: 1px solid var(--line); background: var(--surface); }
.icon-btn.filled { background: var(--surface); }
.icon-btn:disabled { opacity: .35; cursor: default; }

.pro-btn { width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--iris); color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; animation: pro-glow 2.4s ease-out infinite; flex-shrink: 0; }
.pro-btn.big { width: 84px; height: 84px; }
.pro-btn.big .ic { width: 40px; height: 40px; stroke-width: 1.6; }
.pro-btn.still, body.is-pro .pro-btn { animation: none; }
@keyframes pro-glow {
  0% { box-shadow: 0 0 0 0 rgba(85, 70, 255, .5); }
  70% { box-shadow: 0 0 0 14px rgba(85, 70, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(85, 70, 255, 0); }
}
@media (prefers-reduced-motion: reduce) { .pro-btn { animation: none; box-shadow: 0 0 0 4px rgba(85, 70, 255, .25); } }

.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); }
.seg button { height: 36px; padding: 0 14px; border: none; border-radius: 9px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"], .seg button.on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(11, 16, 32, .08); }
html[data-theme="dark"] .seg button[aria-pressed="true"], html[data-theme="dark"] .seg button.on, html[data-theme="dark"] .seg button[aria-selected="true"] { background: var(--line); }
.seg.small button { height: 32px; padding: 0 12px; font-size: 13px; }

.switch { width: 50px; height: 30px; border-radius: 15px; border: none; background: var(--rule); position: relative; flex-shrink: 0; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #FFFFFF; transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }

.pro-mini { font-size: 10px; font-weight: 700; color: var(--accent); letter-spacing: .02em; vertical-align: 2px; }
body:not(.is-pro) .pro-tag { position: relative; }
body:not(.is-pro) .pro-tag::after { content: "PRO"; position: absolute; top: 3px; right: 1px; font-size: 8.5px; font-weight: 700; color: var(--accent); }

/* ---------- auth screens ---------- */
.auth { flex-direction: column; align-items: center; overflow-y: auto; padding: calc(56px + var(--safe-t)) 24px calc(20px + var(--safe-b)); }
.auth-inner { width: 100%; max-width: 360px; display: flex; flex-direction: column; align-items: center; text-align: center; flex: 1; }
.auth-logo { width: 56px; height: 56px; }
.auth-logo .mark, .about .mark { fill: var(--text); }
.auth-logo .iris { fill: var(--iris); }
.auth h1 { font-size: 22px; font-weight: 600; margin-top: 18px; letter-spacing: -.01em; }
.auth-sub { margin-top: 8px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.auth-form { width: 100%; display: flex; flex-direction: column; gap: 12px; margin-top: 28px; text-align: left; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.field input, select { height: 50px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 17px; width: 100%; }
select { height: 40px; font-size: 14px; width: auto; }
.check-row { display: flex; gap: 10px; align-items: center; font-size: 14px; min-height: 32px; }
.check-row input { width: 20px; height: 20px; accent-color: var(--accent); }
.hint { font-size: 13px; color: var(--muted); }
.warn { font-size: 13px; color: var(--muted); line-height: 1.5; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.error { color: var(--danger); font-size: 14px; min-height: 0; }
.error:empty { display: none; }
.credit { font-size: 12px; color: var(--muted); margin-top: 10px; }
.secure-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 18px; }
.dots { display: flex; gap: 16px; justify-content: center; margin-top: 30px; min-height: 14px; }
.dots span { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--muted); }
.dots span.on { background: var(--text); border-color: var(--text); }
.dots.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 72px); gap: 18px 28px; margin-top: 40px; justify-content: center; }
.keypad button { width: 72px; height: 72px; border-radius: 50%; border: none; background: var(--surface); color: var(--text); font-size: 26px; font-weight: 500; display: flex; align-items: center; justify-content: center; }
.keypad button:active { background: var(--line); }
.keypad button.ghost { background: transparent; }
.keypad button.ghost .ic { width: 28px; height: 28px; }
.keypad button.ghost:disabled { visibility: hidden; }

/* ---------- app layout ---------- */
#screen-app { flex-direction: row; }
#pane-list { width: 100%; display: flex; flex-direction: column; position: relative; min-width: 0; background: var(--bg); }
#pane-editor { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--page); position: relative; }
@media (max-width: 839px) {
  body[data-view="list"] #pane-editor { display: none; }
  body[data-view="editor"] #pane-list { display: none; }
}
@media (min-width: 840px) {
  #pane-list { width: 340px; flex-shrink: 0; border-right: 1px solid var(--line); }
  #btn-back { visibility: hidden; width: 8px; }
}
/* Dual-screen and foldables: list on one side of the fold, the note on the other */
@media (horizontal-viewport-segments: 2) {
  #pane-list { width: env(viewport-segment-width 0 0, 340px); }
  #pane-editor { margin-left: calc(env(viewport-segment-left 1 0, 0px) - env(viewport-segment-right 0 0, 0px)); }
  #btn-back { visibility: hidden; width: 8px; }
}

.list-head { display: flex; align-items: center; justify-content: space-between; padding: calc(16px + var(--safe-t)) 20px 12px; }
.list-head h1 { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.head-actions { display: flex; gap: 10px; align-items: center; }
.search-wrap { margin: 0 20px 12px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; gap: 8px; padding: 0 12px; color: var(--muted); }
.search-wrap input { flex: 1; border: none; outline: none; background: transparent; font-size: 16px; color: var(--text); min-width: 0; }
.list-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 20px; }
.chips { display: flex; gap: 8px; padding: 12px 20px 0; overflow-x: auto; scrollbar-width: none; }
.chips:empty { display: none; }
.chips button { height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; white-space: nowrap; color: var(--muted); }
.chips button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.note-list { list-style: none; margin: 0; padding: 14px 20px 140px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; flex: 1; }
.note-card { width: 100%; display: flex; gap: 14px; align-items: flex-start; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-align: left; color: var(--text); }
.note-card.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.note-icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.note-icon .ic { width: 20px; height: 20px; }
.note-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.note-title-row { display: flex; align-items: center; gap: 6px; }
.note-name { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-title-row .ic { width: 14px; height: 14px; color: var(--muted); }
.note-title-row .pinned { color: var(--accent); }
.note-prev { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-when { font-size: 12px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 60px 20px; line-height: 1.6; position: absolute; top: 180px; left: 0; right: 0; }
.list-fab { position: absolute; right: 20px; bottom: calc(24px + var(--safe-b)); display: flex; gap: 12px; align-items: center; }
.fab { height: 56px; padding: 0 22px; border-radius: 28px; border: none; background: var(--text); color: var(--bg); display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; box-shadow: var(--shadow); }
.fab-round { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow); }
#banners { position: absolute; left: 20px; right: 20px; bottom: calc(96px + var(--safe-b)); display: flex; flex-direction: column; gap: 8px; }
.banner { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 14px; line-height: 1.4; }
.banner span { flex: 1; }

/* ---------- editor ---------- */
.editor-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--muted); }
.editor-empty svg { width: 48px; height: 48px; }
.editor-empty .mark-muted { fill: var(--rule); }
#editor { display: flex; flex-direction: column; height: 100%; position: relative; }
.ed-head { display: flex; align-items: center; gap: 8px; padding: calc(8px + var(--safe-t)) 10px 8px; border-bottom: 1px solid var(--line); background: var(--page); }
.ed-actions { margin-left: auto; display: flex; }
.auto-hint { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scroller { flex: 1; overflow: auto; position: relative; touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.scroller.draw-touch { touch-action: none; }
.scroller.draw-touch .note-body, .scroller.draw-touch .note-title { -webkit-user-select: none; user-select: none; }
.ink-canvas { position: absolute; pointer-events: none; z-index: 2; }

.page { max-width: 860px; margin: 0 auto; min-height: 100%; padding: 22px 28px 220px 56px; background-color: var(--page); position: relative; }
.note-title { width: 100%; border: none; outline: none; background: transparent; font-size: 28px; font-weight: 700; letter-spacing: -.02em; color: var(--text); padding: 0; height: calc(var(--sp) * 1.5); }
.note-title::placeholder { color: var(--muted); opacity: .6; }
.note-meta { font-size: 12px; color: var(--muted); height: calc(var(--sp) * .5); line-height: calc(var(--sp) * .5); }
.note-body { outline: none; font-size: 17px; line-height: var(--sp); min-height: 60vh; word-wrap: break-word; caret-color: var(--accent); }
.note-body:empty::before { content: attr(data-placeholder); color: var(--muted); opacity: .7; pointer-events: none; }
.note-body h1, .note-body h2, .note-body h3 { margin: 0; line-height: var(--sp); }
.note-body h1 { font-size: 26px; line-height: calc(var(--sp) * 1.5); }
.note-body h2 { font-size: 21px; }
.note-body h3 { font-size: 18px; }
.note-body p, .note-body div { margin: 0; }
.note-body ul, .note-body ol { margin: 0; padding-left: 26px; }
.note-body ul.checklist { list-style: none; padding-left: 0; }
.note-body ul.checklist > li { position: relative; padding-left: 32px; }
.note-body ul.checklist > li::before { content: ""; position: absolute; left: 2px; top: calc((var(--sp) - 20px) / 2); width: 20px; height: 20px; border-radius: 6px; border: 1.8px solid var(--muted); box-sizing: border-box; cursor: pointer; }
.note-body ul.checklist > li[data-checked="true"] { color: var(--muted); text-decoration: line-through; }
.note-body ul.checklist > li[data-checked="true"]::before { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 14px no-repeat; border-color: var(--accent); }
.note-body blockquote { margin: 0; padding-left: 14px; border-left: 3px solid var(--rule); color: var(--muted); }
.note-body table { border-collapse: collapse; margin: 4px 0; background: var(--page); }
.note-body th, .note-body td { border: 1px solid var(--rule); padding: 0 10px; min-width: 70px; text-align: left; vertical-align: top; }
.note-body th { background: var(--surface-2); font-weight: 600; }
.note-body img { max-width: 100%; height: auto; border-radius: 10px; display: block; margin: 4px 0; }
.note-body hr { border: none; border-top: 1px solid var(--rule); margin: calc(var(--sp) / 2 - 1px) 0 calc(var(--sp) / 2); }
.note-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }

/* page styles */
.page.bg-lines {
  background-image:
    linear-gradient(to right, transparent 0 40px, var(--margin) 40px 41px, transparent 41px),
    repeating-linear-gradient(to bottom, transparent 0 calc(var(--sp) - 1px), var(--rule) calc(var(--sp) - 1px) var(--sp));
  background-position: 0 0, 0 calc(22px + var(--sp) * 2);
}
.page.bg-grid {
  background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: calc(var(--sp) * .75) calc(var(--sp) * .75);
}
.page.bg-ngrid {
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px),
    linear-gradient(color-mix(in srgb, var(--rule) 55%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--rule) 55%, transparent) 1px, transparent 1px);
  background-size: calc(var(--sp) * 2) calc(var(--sp) * 2), calc(var(--sp) * 2) calc(var(--sp) * 2), calc(var(--sp) / 2) calc(var(--sp) / 2), calc(var(--sp) / 2) calc(var(--sp) / 2);
}

/* toolbars */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 8px 12px calc(8px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--bg); }
.toolbar .tool { width: 44px; height: 44px; border: none; border-radius: 12px; background: transparent; display: inline-flex; align-items: center; justify-content: center; color: var(--text); }
.toolbar .tool[aria-pressed="true"] { background: var(--accent); color: #FFFFFF; }
.toolbar .tool[aria-pressed="true"]::after { color: #FFFFFF !important; }
.ink-dock { flex-direction: column; align-items: stretch; gap: 8px; }
.ink-dock + #format-bar, #format-bar + .ink-dock { border-top: none; }
#editor.both-bars #format-bar { padding-bottom: 4px; }
.dock-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.tools-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.dock-sep { width: 1px; height: 28px; background: var(--rule); flex-shrink: 0; }
.chip-btn { height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.colors { display: flex; gap: 8px; align-items: center; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; flex-shrink: 0; padding: 0; position: relative; }
.swatch[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--bg); }
.swatch.locked::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(245, 246, 250, .55); }
.pro-tag-text { position: relative; }
body:not(.is-pro) .pro-tag-text::after { content: "PRO"; font-size: 8.5px; font-weight: 700; color: var(--accent); margin-left: 4px; }

@media (min-width: 840px) {
  .ink-dock { flex-direction: row; align-items: center; }
  .ink-dock .tools-row { order: -1; }
}

.toast { position: absolute; left: 50%; transform: translateX(-50%); bottom: 140px; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: 22px; background: var(--midnight); color: var(--porcelain); font-size: 14px; white-space: nowrap; box-shadow: var(--shadow); }
html[data-theme="dark"] .toast { background: var(--porcelain); color: var(--midnight); }
.toast button { height: 32px; padding: 0 12px; border: none; border-radius: 16px; background: rgba(255, 255, 255, .14); color: inherit; font-size: 13px; font-weight: 600; }
html[data-theme="dark"] .toast button { background: rgba(11, 16, 32, .1); }
.toast button:empty { display: none; }

/* ---------- sheets ---------- */
dialog.sheet { border: none; padding: 0; background: var(--bg); color: var(--text); width: 100%; max-width: 520px; max-height: 92vh; border-radius: 24px; box-shadow: var(--shadow); overflow: hidden; }
dialog.sheet::backdrop { background: rgba(11, 16, 32, .45); }
@media (max-width: 600px) {
  dialog.sheet { margin: auto 0 0; max-width: none; border-radius: 24px 24px 0 0; max-height: 94vh; }
  dialog.small-sheet { margin: auto 16px; width: auto; border-radius: 20px; }
}
.sheet-body { padding: 20px 20px calc(24px + var(--safe-b)); overflow-y: auto; max-height: 92vh; display: flex; flex-direction: column; gap: 8px; position: relative; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.sheet-head h2 { font-size: 22px; font-weight: 700; }
.small-sheet { max-width: 420px; }
.small-sheet h2 { font-size: 19px; font-weight: 700; }
.dlg-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }
.dlg-actions .btn { height: 44px; }
.group-label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 14px 4px 2px; }
.group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2px 14px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; border-bottom: 1px solid var(--line); padding: 6px 0; width: 100%; font-size: 15px; }
.row:last-child { border-bottom: none; }
.row.as-btn { background: transparent; border-left: none; border-right: none; border-top: none; text-align: left; }
.group .row.as-btn:last-child { border-bottom: none; }
.stack { display: flex; flex-direction: column; gap: 2px; }
.page-styles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.page-style { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 11px; position: relative; }
.page-style[aria-pressed="true"] { border: 2px solid var(--accent); padding: 7px 3px; }
.page-style .thumb { width: 52px; height: 64px; border-radius: 6px; border: 1px solid var(--line); background-color: var(--page); --sp: 10px; padding: 0; min-height: 0; }
.page-style .thumb.bg-lines { background-position: 0 0, 0 4px; background-image: repeating-linear-gradient(to bottom, transparent 0 9px, var(--rule) 9px 10px); }
.page-style .lock { font-size: 9px; font-weight: 700; color: var(--accent); }
.about { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 16px; }
.about svg { width: 16px; height: 16px; fill: var(--muted); }

.pro-body { padding-top: 16px; }
.pro-body .close { position: absolute; right: 16px; top: 16px; z-index: 1; }
.pro-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding-top: 20px; }
.pro-hero h2 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-top: 18px; }
.price { margin-top: 10px; font-size: 40px; font-weight: 700; letter-spacing: -.02em; }
.price s { font-size: 16px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.feature-list { list-style: none; margin: 18px 0 10px; padding: 16px 18px; border-radius: 18px; background: var(--surface); display: flex; flex-direction: column; gap: 11px; }
.feature-list li { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.feature-list .ic { width: 18px; height: 18px; color: #8C82FF; stroke-width: 2.2; }
#pro-buy .btn { margin-top: 8px; }

/* ---------- menu ---------- */
.menu { position: fixed; z-index: 50; min-width: 220px; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.menu button { width: 100%; height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: none; border-radius: 10px; background: transparent; font-size: 15px; text-align: left; color: var(--text); }
.menu button:hover { background: var(--surface-2); }
.menu button.danger { color: var(--danger); }
.menu hr { border: none; border-top: 1px solid var(--line); margin: 4px 6px; }

/* ---------- print (PDF export) ---------- */
#print-area { display: none; }
@media print {
  @page { margin: 14mm; }
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; position: relative; color: #0B1020; background: #FFFFFF; font-family: var(--font); }
  #print-area h1 { font-size: 24pt; margin-bottom: 4mm; }
  #print-area .print-body { font-size: 12pt; line-height: 1.55; }
  #print-area .print-body ul.checklist { list-style: none; padding-left: 0; }
  #print-area .print-body ul.checklist li::before { content: "☐ "; }
  #print-area .print-body ul.checklist li[data-checked="true"]::before { content: "☑ "; }
  #print-area img { max-width: 100%; }
  #print-area .print-ink { display: block; width: 100%; margin-top: 6mm; }
  #print-area table { border-collapse: collapse; }
  #print-area td, #print-area th { border: 1px solid #999; padding: 2px 6px; }
}
