:root { color-scheme: light; --text:#202c3c; --muted:#576679; --accent:#a44324; --line:#dbe2ea; --panel:#fff; --background:#f5f7fa; }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; color:var(--text); background:var(--background); font:1rem/1.6 "BIZ UDPGothic","Yu Gothic UI","Hiragino Sans",Meiryo,system-ui,sans-serif; }
button,input,select,textarea { font:inherit; }
button,a,input,select,textarea { outline-offset:3px; }
:focus-visible { outline:2px solid var(--accent); }
a { color:var(--accent); text-underline-offset:.2em; }
h1,h2,p { margin-top:0; }
h1 { font-size:clamp(2.05rem,4.9vw,3.25rem); line-height:1.16; letter-spacing:-.045em; margin-bottom:.75rem; }
h2 { font-size:1.2rem; line-height:1.4; margin-bottom:.65rem; }
.frame { width:min(100% - 2.4rem,68rem); margin-inline:auto; }
.top { background:var(--panel); border-bottom:1px solid var(--line); }
.top-inner { display:flex; align-items:center; justify-content:space-between; min-height:4.2rem; gap:1rem; }
.brand { white-space:nowrap; display:inline-flex; align-items:center; gap:0; text-decoration:none; font-size:1.22rem; color:var(--text); font-weight:800; letter-spacing:-.04em; }
.brand span { color:var(--accent); }
.brand-mark { width:1.45rem; height:1.45rem; margin-right:.52rem; background:var(--accent); clip-path:polygon(49% 0,100% 89%,75% 89%,49% 42%,31% 72%,53% 72%,62% 89%,0 89%); }
nav { display:flex; gap:1.2rem; align-self:stretch; }
nav a { display:flex; align-items:center; padding-top:2px; border-bottom:2px solid transparent; text-decoration:none; white-space:nowrap; color:var(--muted); }
nav a[aria-current] { color:var(--text); border-color:var(--accent); font-weight:650; }
.hero { padding:2.8rem 0 1.6rem; }
.hero p:last-child { color:var(--muted); margin-bottom:0; }
.season { color:var(--accent); font-weight:700; margin-bottom:.38rem; font-size:.9rem; }
.layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(13.5rem,17.25rem); gap:1rem; align-items:start; }
.panel { background:var(--panel); border:1px solid var(--line); border-radius:.65rem; padding:1.15rem; }
.intake { padding:1.4rem; }
.side { display:grid; gap:.85rem; }
.chat-head { display:flex; justify-content:space-between; align-items:center; gap:.6rem; margin-bottom:.75rem; }
.chat-head h2 { margin:0; }
.reset { min-height:2rem!important; margin-top:0!important; font-size:.85rem; }
.chat-log { display:flex; flex-direction:column; gap:.8rem; min-height:9rem; max-height:25rem; overflow:auto; padding:.7rem; background:#f5f7fb; border:1px solid var(--line); border-radius:.45rem; }
.message-row { display:flex; flex-direction:column; align-items:flex-start; max-width:88%; width:fit-content; }
.message-row.outgoing { align-self:flex-end; align-items:flex-end; }
.speaker { color:var(--muted); font-size:.82rem; margin:0 .15rem .15rem; }
.bubble { margin:0; padding:.6rem .75rem; border:1px solid var(--line); border-radius:0 .58rem .58rem .58rem; background:var(--panel); white-space:pre-wrap; overflow-wrap:anywhere; }
.outgoing .bubble { background:#fff0e8; border-color:#efcbbb; border-radius:.58rem 0 .58rem .58rem; }
.review { margin-top:.85rem; background:#fff7f1; border:1px solid #efd0c0; border-radius:.45rem; padding:1rem; }
.review h3 { margin:0 0 .55rem; }
.review dl { display:grid; grid-template-columns:max-content 1fr; gap:.4rem .7rem; }
.review dt { font-weight:650; font-size:.9rem; }
.review dd { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; }
.review p { margin:0; font-size:.875rem; }
.composer-actions { display:flex; flex-wrap:wrap; gap:.7rem; align-items:baseline; }
.composer-actions span { font-size:.82rem; }
form label { display:block; font-weight:650; margin:.9rem 0 .32rem; }
form input, form select, form textarea { color:var(--text); width:100%; max-width:100%; border:1px solid #becbda; border-radius:.4rem; padding:.56rem .66rem; background:#fcfdff; }
form textarea { resize:vertical; min-height:5rem; }
form textarea::placeholder, form input::placeholder { color:#647487; }
.primary,.secondary { display:inline-flex; min-height:2.55rem; align-items:center; justify-content:center; padding:.43rem .8rem; border-radius:.4rem; font-weight:650; margin-top:.8rem; cursor:pointer; }
.primary { background:var(--accent); color:#fff; border:1px solid var(--accent); }
.primary:hover { background:#89351c; }
.secondary { background:var(--panel); color:var(--text); border:1px solid #bac8d8; }
.secondary:hover { background:#f2f6fa; }
button:disabled { opacity:.65; cursor:wait; }
.actions { display:flex; flex-wrap:wrap; gap:.55rem; }
.message,.notice { padding:.62rem .75rem; border-radius:.4rem; background:#eef4fa; color:#25466a; margin:.8rem 0; }
.message.error { background:#fff1ec; color:#882f20; }
.muted { color:var(--muted); }
.counts { display:grid; grid-template-columns:1fr 1fr; gap:.5rem; margin:.55rem 0 .75rem; }
.counts div { background:#f3f6fa; padding:.5rem .6rem; border-radius:.3rem; }
.counts dt { font-size:.82rem; color:var(--muted); white-space:nowrap; }
.counts dd { margin:0; font-size:1.55rem; line-height:1.3; font-weight:750; font-variant-numeric:tabular-nums; }
.receipt { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:.45rem .7rem; background:#edf8f1; padding:.7rem; margin-top:.8rem; border-radius:.4rem; overflow-wrap:anywhere; }
.status-output { margin:.6rem 0 0; font-size:.9rem; }
.footer { border-top:1px solid var(--line); padding:1rem 0 1.6rem; margin-top:1.8rem; color:var(--muted); font-size:.875rem; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
@media(max-width:44rem) {
  .frame { width:calc(100% - 1.5rem); }
  .top-inner { flex-wrap:wrap; gap:.25rem .65rem; padding-top:.5rem; }
  nav { gap:.7rem; font-size:.875rem; min-height:2.5rem; }
  .hero { padding-top:2rem; }
  .layout { grid-template-columns:1fr; }
  .intake { padding:1rem; }
  .review dl { grid-template-columns:1fr; }
}
