/* Pierce the Shadow — Dream Diary Constellation (Session 96). Builds on site.css. */

body.diary { background: var(--ground); }
.app { max-width: 1320px; margin: 0 auto; padding: 8px 32px 80px; }
.muted { color: var(--faint); }
.serif-i { font-style: italic; }
.small { font-size: 13px; }
.center { text-align: center; }
.row-gap { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* account menu */
.acct { position: relative; }
.acct-btn { background: none; border: 1px solid var(--line); border-radius: 100px; padding: 8px 14px; font-size: 14px; color: var(--muted); cursor: pointer; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-btn:hover { border-color: #D8C4E0; color: var(--ink); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 250px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lift); padding: 8px; z-index: 60; }
.menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 12px; border-radius: 9px; font-size: 14.5px; color: var(--ink-soft); cursor: pointer; }
.menu button:hover { background: var(--panel); color: var(--ink); }
.menu .danger { color: var(--danger); }
.menu hr { border: 0; border-top: 1px solid var(--line-soft); margin: 6px 4px; }
.menu .who { padding: 6px 12px 8px; font-size: 12.5px; color: var(--faint); overflow-wrap: anywhere; }

/* ── signed out ── */
.welcome { max-width: 640px; margin: 48px auto 0; text-align: center; }
.welcome h1 { font-size: 40px; line-height: 1.25; margin: 14px 0 16px; }
.welcome h1 em { color: var(--purple); }
.welcome .lede { font-size: 17px; line-height: 1.75; font-weight: 300; margin-bottom: 30px; }
.entry-card { background: var(--card); border: 1px solid var(--line-purple); border-radius: 18px; padding: 26px 28px; box-shadow: var(--shadow-lift); text-align: left; }
.entry-card textarea { width: 100%; min-height: 190px; resize: vertical; border: 0; background: transparent; font-size: 17px; line-height: 1.85; font-style: italic; color: var(--ink-soft); outline: none; }
.entry-card textarea::placeholder { color: var(--whisper); }
.entry-foot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line-soft); padding-top: 16px; margin-top: 6px; }
.text-input { flex: 1; min-width: 200px; border: 1px solid var(--line); background: var(--ground); border-radius: 100px; padding: 10px 18px; font-size: 15px; outline: none; }
.text-input:focus { border-color: #C8A8E0; background: #fff; }
.status-line { font-size: 14px; color: var(--muted); margin-top: 14px; min-height: 1.4em; }
.status-line.err { color: var(--danger); }
.consent { font-size: 12.5px; line-height: 1.6; color: var(--faint); margin-top: 10px; }
.consent a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }

/* ── layout: rail + main ── */
.diary-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 34px; align-items: start; }
/* Long unbreakable content (dream previews, titles) must never widen the page — on phones that forces sideways scrolling. */
.diary-grid > *, .page-grid > *, .drow-main > *, .page-main > * { min-width: 0; }
.drow .t, .dtitle, .ccard .ti { overflow-wrap: anywhere; }
.rail { position: sticky; top: 84px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px 18px; display: flex; flex-direction: column; gap: 24px; max-height: calc(100vh - 104px); overflow: auto; }
.rail h4 { font-size: 11px; letter-spacing: 1.3px; text-transform: uppercase; color: #A8905A; margin-bottom: 8px; font-weight: 400; }
.rail-list { display: flex; flex-direction: column; gap: 2px; }
.rail-list button { display: flex; justify-content: space-between; gap: 8px; width: 100%; background: none; border: 0; border-radius: 9px; padding: 7px 10px; font-size: 14.5px; color: var(--muted); cursor: pointer; text-align: left; }
.rail-list button:hover { background: var(--panel-deep); color: var(--ink); }
.rail-list button.on { background: var(--purple-tint); color: var(--purple); }
.rail-list .n { color: var(--whisper); font-variant-numeric: tabular-nums; }
.rail-list .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--kc); margin-right: 8px; vertical-align: 1px; }
.rail-foot { font-size: 13px; color: #A89078; border-top: 1px solid var(--line); padding-top: 14px; line-height: 1.6; }

.toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 6px 0 22px; }
.modes { display: inline-flex; gap: 4px; background: var(--panel-deep); border-radius: 100px; padding: 4px; }
.modes button { background: none; border: 0; padding: 8px 18px; border-radius: 100px; font-size: 14.5px; color: #8A7050; cursor: pointer; }
.modes button[aria-pressed="true"] { background: var(--card); color: var(--purple); box-shadow: 0 2px 8px rgba(90, 42, 138, .12); }
.modes.sm button { padding: 5px 13px; font-size: 13px; }
.search { position: relative; flex: 1; min-width: 200px; max-width: 420px; margin-left: auto; }
.search input { width: 100%; border: 1px solid var(--line); background: var(--card); border-radius: 100px; padding: 9px 36px 9px 38px; font-size: 14.5px; outline: none; }
.search input:focus { border-color: #C8A8E0; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); }
.search .clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--faint); font-size: 18px; cursor: pointer; padding: 2px 6px; }

.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.head h1 { font-size: 32px; }
.head .note { font-size: 14px; color: var(--faint); max-width: 56ch; margin-top: 4px; }
.chipbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.fchip { background: var(--card); border: 1px solid var(--line); border-radius: 100px; padding: 4px 12px; font-size: 13px; color: var(--muted); cursor: pointer; }
.fchip:hover { border-color: #D8C4E0; color: var(--ink); }
.fchip.on { background: var(--purple); border-color: var(--purple); color: #FCF6EC; }
.fchip .n { opacity: .6; margin-left: 4px; font-variant-numeric: tabular-nums; }
.showing { font-size: 13px; color: var(--faint); margin-bottom: 4px; }

/* dreams list */
.month { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold-label); padding: 22px 4px 8px; border-bottom: 1px solid var(--line); }
.drow { display: flex; align-items: flex-start; gap: 4px; border-bottom: 1px solid var(--line-soft); }
.drow:hover { background: color-mix(in srgb, var(--panel) 55%, transparent); }
.heart { background: none; border: 0; color: #D8C8D8; font-size: 19px; line-height: 1; padding: 16px 6px 0 4px; cursor: pointer; }
.heart:hover, .heart.on { color: var(--gold-bright); }
.drow-main { flex: 1; min-width: 0; display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 16px; align-items: baseline; background: none; border: 0; text-align: left; padding: 14px 8px 14px 0; cursor: pointer; color: inherit; }
.drow .d { font-size: 13px; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.drow .t { font-size: 18px; color: var(--ink); line-height: 1.35; }
.drow .pv { display: block; font-size: 14px; color: var(--faint); font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.drow .els { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.marks { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.mini { font-size: 11.5px; border-radius: 100px; padding: 1px 9px; white-space: nowrap; background: var(--panel); color: var(--muted); }
.mini.purple { background: var(--purple-soft); color: var(--purple); }
.mini.gold { background: var(--gold-soft); color: var(--gold); }
.mini.dashed { background: none; border: 1px dashed #D8C4E0; color: var(--faint); }
.snip { display: block; font-size: 14px; color: var(--muted); margin-top: 4px; }
.snip mark { background: var(--gold-soft); color: var(--gold); border-radius: 3px; padding: 0 2px; }
.empty { padding: 36px 8px; color: var(--faint); font-style: italic; text-align: center; }

/* element chips */
.echip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 100px; background: var(--kcs); color: var(--kc); font-size: 13px; line-height: 1.5; cursor: pointer; border: 1px solid transparent; }
.echip:hover { border-color: var(--kc); }
.echip .n { opacity: .6; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.echip .x { opacity: .5; font-size: 14px; padding: 0 1px; }
.echip .x:hover { opacity: 1; color: var(--danger); }
.echip.static { cursor: default; }

/* constellation grid */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.ccard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; text-align: left; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; color: inherit; }
.ccard:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--kc); }
.ccard .k { font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--kc); margin-bottom: 6px; }
.ccard .ti { font-size: 17px; color: var(--ink); margin-bottom: 10px; line-height: 1.3; overflow-wrap: anywhere; }
.ccard .bar { height: 5px; border-radius: 3px; background: var(--kcs); overflow: hidden; margin-bottom: 8px; }
.ccard .bar i { display: block; height: 100%; background: var(--kc); opacity: .8; border-radius: 3px; }
.ccard .ct { font-size: 13px; color: var(--faint); display: flex; justify-content: space-between; gap: 6px; }
.ccard .noted { color: var(--gold-bright); }

/* star map */
.mapwrap { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.mapwrap canvas { display: block; cursor: grab; touch-action: none; }
.mapwrap.bare { border: 0; background: none; }
.maptip { position: absolute; background: var(--ink); color: #FCF6EC; padding: 7px 11px; border-radius: 9px; font-size: 13px; line-height: 1.45; pointer-events: none; white-space: nowrap; z-index: 4; }
.maptip .t { opacity: .7; font-size: 12px; }
.aside { font-size: 13px; color: var(--faint); font-style: italic; margin-top: 10px; }

/* ── dream / item page ── */
.crumbs { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--faint); margin: 4px 0 18px; flex-wrap: wrap; }
.crumbs button.back { background: none; border: 0; color: var(--purple); cursor: pointer; padding: 0; font-size: 14px; }
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 30px; align-items: start; }
.page-main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.card { background: var(--card); border: 1px solid var(--line-purple); border-radius: 16px; padding: 24px 28px; }
.card.plain { border-color: var(--line); }
.section-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.section-h > div:first-child { min-width: 220px; }
.section-h h2 { font-size: 12px; letter-spacing: 1.3px; text-transform: uppercase; color: #A89078; margin-right: auto; }
.dtitle { font-size: 30px; line-height: 1.25; color: var(--ink); }
.ddate { font-size: 14px; color: var(--faint); margin-top: 4px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ddate input[type=date] { border: 0; background: none; color: var(--faint); font-size: 14px; padding: 0; }
.dtext { font-size: 17.5px; font-style: italic; line-height: 1.9; color: var(--ink-soft); white-space: pre-wrap; margin-top: 18px; }
.editable { border: 1px dashed transparent; border-radius: 10px; padding: 6px 10px; margin: -6px -10px; min-height: 2.2em; white-space: pre-wrap; outline: none; overflow-wrap: anywhere; }
.editable:hover { border-color: var(--line); }
.editable:focus { border-color: #C8A8E0; border-style: solid; background: #fff; }
.editable.empty::before { content: attr(data-ph); color: var(--whisper); font-style: italic; }
.thoughts { font-size: 15.5px; line-height: 1.75; color: var(--ink-soft); }
.saving { font-size: 12.5px; color: var(--faint); }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.wand { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 100px; border: 1px solid #E4C890; background: var(--gold-soft); color: var(--gold); font-size: 14px; cursor: pointer; white-space: nowrap; }
.wand:hover { border-color: var(--gold-bright); color: #8A6018; }
.wand:disabled { opacity: .55; cursor: default; }
.iconbtn { background: none; border: 1px solid transparent; border-radius: 100px; color: var(--faint); cursor: pointer; padding: 6px 10px; font-size: 15px; }
.iconbtn:hover { border-color: var(--line); color: var(--ink); }

.boxes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.box { background: var(--card); border: 1px solid var(--line); border-top: 2px solid var(--kc); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.box-h { display: flex; align-items: center; gap: 6px; margin-bottom: 9px; }
.box-h h3 { font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--kc); margin-right: auto; font-weight: 400; }
.box-h .add { background: none; border: 0; color: var(--faint); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; border-radius: 6px; }
.box-h .add:hover { color: var(--kc); background: var(--kcs); }
.box .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.box .none { font-size: 13px; color: var(--whisper); font-style: italic; }

/* suggestions review */
.suggest { border: 1px solid #E4C890; background: #FFFBF2; border-radius: 16px; padding: 20px 22px; }
.suggest h3 { font-size: 20px; margin-bottom: 4px; }
.suggest .sub { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.sgroups { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px 18px; }
.sgroup h4 { font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--kc); margin-bottom: 6px; font-weight: 400; }
.sopt { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 15px; color: var(--ink-soft); cursor: pointer; }
.sopt input { accent-color: var(--purple); width: 16px; height: 16px; }
.sopt .tag-new { font-size: 11px; color: var(--gold); background: var(--gold-soft); border-radius: 100px; padding: 0 7px; }
.sopt .tag-n { font-size: 12px; color: var(--faint); }

/* thinking / errors */
.working { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--muted); padding: 10px 2px; font-style: italic; }
.spin { width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--purple-bright); border-radius: 50%; animation: sp .8s linear infinite; flex: none; }
@keyframes sp { to { transform: rotate(360deg); } }
.errbox { background: var(--danger-soft); border: 1px solid #E8C0BC; color: var(--danger); border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-top: 10px; }

/* archive */
.archive-toggle { width: 100%; display: flex; align-items: center; gap: 10px; background: none; border: 1px dashed #DCC8D8; border-radius: 14px; padding: 14px 18px; color: var(--muted); cursor: pointer; text-align: left; font-size: 15px; }
.archive-toggle:hover { border-color: #C8A8E0; color: var(--ink); }
.archive { border: 1px dashed #DCC8D8; border-radius: 16px; padding: 20px 24px; background: color-mix(in srgb, var(--panel) 40%, transparent); }
.archive h4 { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: #A89078; margin: 16px 0 8px; font-weight: 400; }
.archive h4:first-of-type { margin-top: 4px; }
.arch-el { margin-bottom: 12px; }
.arch-el .lbl { color: var(--ink); font-size: 16px; }
.arch-el .desc { font-size: 14.5px; color: var(--muted); }
.arch-el .q { font-size: 14px; font-style: italic; color: var(--faint); }
.arch-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.arch-chip { font-size: 13px; border-radius: 100px; padding: 2px 10px; background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.arch-chip.sel { border-color: #C8A8E0; background: var(--purple-soft); color: var(--purple); }
.arch-words { white-space: pre-wrap; font-size: 15px; line-height: 1.75; color: var(--ink-soft); background: var(--card); border-radius: 10px; padding: 10px 14px; border: 1px solid var(--line-soft); }

/* discussion panel */
.side { position: sticky; top: 84px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px 20px; display: flex; flex-direction: column; gap: 16px; max-height: calc(100vh - 104px); overflow: auto; }
.side-h { display: flex; align-items: center; gap: 8px; }
.side-h h2 { font-size: 17px; color: var(--ink); margin-right: auto; font-weight: 500; }
.summary-note { background: var(--card); border: 1px solid var(--line-purple); border-radius: 12px; padding: 12px 14px; font-size: 14.5px; line-height: 1.65; color: var(--ink-soft); }
.summary-note b { color: var(--purple); font-weight: 500; }
.starters { display: flex; flex-direction: column; gap: 8px; }
.starter { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 12px 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--line-purple); color: var(--purple); font-size: 15.5px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.starter:hover { border-color: #C8A8E0; box-shadow: var(--shadow); }
.starter small { font-size: 13px; color: var(--faint); }
.starter:disabled { opacity: .55; cursor: default; }
.openbox { background: var(--card); border: 1px solid var(--line-purple); border-radius: 12px; padding: 10px 12px; }
.openbox textarea { width: 100%; border: 0; background: none; resize: vertical; min-height: 70px; font-size: 15px; line-height: 1.6; outline: none; color: var(--ink-soft); }
.openbox textarea::placeholder { color: var(--whisper); }
.openbox .row-gap { justify-content: flex-end; }
.threads { display: flex; flex-direction: column; gap: 10px; }
.thread { background: color-mix(in srgb, var(--card) 70%, transparent); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.thread-h { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; padding: 10px 14px; text-align: left; cursor: pointer; color: var(--ink-soft); font-size: 14.5px; }
.thread-h .tt { margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-h .td { font-size: 12px; color: var(--faint); white-space: nowrap; }
.thread-body { padding: 4px 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 92%; font-size: 14.5px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; background: var(--purple); color: #FCF6EC; padding: 10px 14px; border-radius: 16px 16px 4px 16px; }
.msg.ai { align-self: flex-start; background: var(--card); border: 1px solid var(--line); color: var(--ink-soft); padding: 12px 14px; border-radius: 16px 16px 16px 4px; }
.msg .rx { display: flex; gap: 6px; margin-top: 8px; }
.rx button { background: none; border: 1px solid transparent; border-radius: 100px; padding: 2px 8px; cursor: pointer; color: var(--whisper); display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.rx button:hover { border-color: var(--line); color: var(--muted); }
.rx button.on { color: var(--purple); background: var(--purple-soft); }
.rx button.on.down { color: var(--danger); background: var(--danger-soft); }
.composer { display: flex; gap: 8px; align-items: flex-end; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 6px 6px 6px 14px; }
.composer textarea { flex: 1; border: 0; background: none; resize: none; min-height: 40px; max-height: 220px; font-size: 14.5px; line-height: 1.55; padding: 8px 0; outline: none; color: var(--ink-soft); }
.composer textarea::placeholder { color: var(--whisper); }
.thread-foot { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--faint); font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { color: var(--ink); }
.donate { border-top: 1px solid var(--line); padding-top: 14px; font-size: 13.5px; line-height: 1.7; color: var(--muted); }
.donate a { border-bottom: 1px solid #D8C4E0; }

/* item page */
.kindline { font-size: 12px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--kc); }
.dreamlink { display: flex; gap: 14px; align-items: baseline; width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line-soft); padding: 9px 2px; cursor: pointer; text-align: left; color: inherit; }
.dreamlink:hover { background: color-mix(in srgb, var(--panel) 55%, transparent); }
.dreamlink .d { font-size: 13px; color: var(--faint); width: 92px; flex: none; }
.dreamlink .t { font-size: 16px; color: var(--ink); }
.chart svg text { font-family: var(--serif); }
.chart .hot:hover { fill: var(--panel); fill-opacity: .6; }
.chartwrap { position: relative; }
.charttip { position: absolute; top: -6px; transform: translateY(-100%); background: var(--ink); color: #FCF6EC; padding: 6px 10px; border-radius: 8px; font-size: 12.5px; line-height: 1.45; pointer-events: none; white-space: nowrap; z-index: 5; }

/* dialog */
.scrim { position: fixed; inset: 0; background: rgba(58, 33, 72, .32); z-index: 80; display: flex; align-items: flex-start; justify-content: center; padding: 9vh 16px 16px; overflow: auto; }
.dialog { background: var(--ground); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 70px -30px rgba(58, 33, 72, .5); width: 100%; max-width: 540px; padding: 24px 26px; }
.dialog h3 { font-size: 23px; margin-bottom: 6px; }
.dialog .sub { font-size: 14.5px; color: var(--muted); margin-bottom: 14px; }
.dialog .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.dialog .field { width: 100%; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 10px 14px; font-size: 15px; outline: none; margin-bottom: 10px; }
.dialog .field:focus { border-color: #C8A8E0; }
.opts { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line-soft); padding: 9px 14px; cursor: pointer; font-size: 15px; color: var(--ink-soft); }
.opt:last-child { border-bottom: 0; }
.opt:hover { background: var(--panel); }
.opt .cnt { margin-left: auto; font-size: 12.5px; color: var(--faint); white-space: nowrap; }
.opt.new { color: var(--purple); }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--ink); color: #FCF6EC; padding: 10px 18px; border-radius: 12px; font-size: 14.5px; z-index: 90; box-shadow: var(--shadow-lift); max-width: calc(100vw - 32px); }

/* entry page */
.new-wrap { max-width: 760px; margin: 12px auto 0; }
.new-wrap h1 { font-size: 34px; margin-bottom: 6px; }
.new-wrap .note { font-size: 15px; color: var(--faint); margin-bottom: 22px; }
.new-card { background: var(--card); border: 1px solid var(--line-purple); border-radius: 18px; padding: 24px 28px; box-shadow: var(--shadow-lift); }
.new-card textarea.dream { width: 100%; min-height: 280px; border: 0; background: none; resize: vertical; outline: none; font-size: 18px; line-height: 1.9; font-style: italic; color: var(--ink-soft); }
.new-card textarea.dream::placeholder, .new-card textarea.thoughts-in::placeholder { color: var(--whisper); }
.new-meta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--line-soft); margin-top: 8px; padding-top: 14px; }
.new-meta input { border: 1px solid var(--line); background: var(--ground); border-radius: 100px; padding: 8px 14px; font-size: 14.5px; outline: none; }
.new-meta input[type=text] { flex: 1; min-width: 180px; }
.new-card textarea.thoughts-in { width: 100%; min-height: 90px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--ground); resize: vertical; outline: none; font-size: 15px; line-height: 1.7; padding: 10px 14px; margin-top: 12px; color: var(--ink-soft); }

/* responsive */
@media (max-width: 1100px) {
  .page-grid { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; max-height: none; }
}
@media (max-width: 900px) {
  .diary-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .rail { position: static; max-height: none; flex-direction: row; flex-wrap: wrap; gap: 14px; padding: 14px; }
  .rail > div { min-width: 0; }
  .rail .rail-kinds, .rail .rail-foot { display: none; }
  .rail-list { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .rail-list button { width: auto; padding: 5px 11px; font-size: 13.5px; background: var(--card); }
  .boxes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .app { padding: 4px 16px 60px; }
  .section-h > div:first-child { flex: 1 1 100% !important; }
  .head-actions { width: 100%; justify-content: flex-start; }
  .rail > div { flex: 1 1 100%; }
  .acct-btn { max-width: 110px; padding: 7px 11px; font-size: 13px; }
  .nav-links a.active { display: none; }
  .search { max-width: none; margin-left: 0; flex-basis: 100%; }
  .drow-main { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .marks { justify-content: flex-start; }
  .boxes { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 18px 18px; }
  .dtitle { font-size: 25px; }
  .welcome h1 { font-size: 30px; }
  .head h1 { font-size: 26px; }
  .cgrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .ccard { padding: 12px 14px; }
}
