/* ANEES live-2.0.0 add-on: tabs, play, my day, notebook, connect */
.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:6;display:flex;justify-content:center;gap:2px;background:color-mix(in srgb,var(--raised) 94%,transparent);backdrop-filter:blur(8px);border-top:1px solid var(--line);padding:6px 8px calc(6px + env(safe-area-inset-bottom))}
.tabbar .tab{flex:1;max-width:150px;min-height:52px;border:0;background:transparent;color:var(--muted);border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;cursor:pointer;font-size:13px;font-weight:500}
.tabbar .tab .ic{font-size:20px;line-height:1}
.tabbar .tab.on{color:var(--text);background:var(--accent-soft)}
.tabbar .tab:focus-visible{outline:3px solid var(--focus);outline-offset:-2px}
body.has-tabbar .app{padding-bottom:76px}
body.has-tabbar .composer{bottom:calc(64px + env(safe-area-inset-bottom))}
body.has-tabbar .toast{bottom:calc(84px + env(safe-area-inset-bottom))}
.styles{align-items:center}
.gamegrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}
.gamecard{display:flex;flex-direction:column;gap:6px;text-align:start;background:var(--raised);border:1px solid var(--line);border-radius:var(--r);padding:16px;cursor:pointer;color:var(--text);min-height:120px}
.gamecard:hover{border-color:var(--accent)}
.gamecard .gic{font-size:30px}
.banterbox .msg.banter{max-width:100%}
.ttt{display:grid;grid-template-columns:repeat(3,minmax(0,92px));gap:8px;justify-content:center;direction:ltr}
.ttt .cell{aspect-ratio:1;font-size:40px;font-weight:600;border:1px solid var(--line-strong);background:var(--raised);color:var(--text);border-radius:14px;cursor:pointer}
.ttt .cell:disabled{cursor:default}
.memgrid{display:grid;grid-template-columns:repeat(4,minmax(0,78px));gap:8px;justify-content:center;direction:ltr}
.mcard{aspect-ratio:1;font-size:32px;border:1px solid var(--line-strong);background:var(--primary);color:var(--on-primary);border-radius:12px;cursor:pointer}
.mcard.up{background:var(--raised);color:var(--text)}
.mcard.done{background:var(--affirm-soft);border-color:var(--affirm)}
.scramble{font-size:30px;font-weight:600;letter-spacing:.08em;text-align:center}
#s-play input,#s-day input,#s-notes input,#s-notes textarea{width:100%;font:inherit;padding:10px 12px;border:1px solid var(--line-strong);border-radius:12px;background:var(--raised);color:var(--text)}
#s-day form input{flex:1;width:auto}
#s-day form.row{flex-wrap:nowrap}
#s-day label.plan{display:flex;flex-direction:row;align-items:center;gap:10px;text-align:start}
#s-day label.plan input[type=checkbox]{width:22px;height:22px;flex:none}
.donetext{text-decoration:line-through;color:var(--muted)}
.affirmline{color:var(--affirm-text);font-weight:600}
.noteitem{display:block;width:100%;text-align:start;background:var(--raised);border:1px solid var(--line);border-radius:12px;padding:12px;cursor:pointer;color:var(--text);margin-bottom:8px}
.notebody{min-height:220px;resize:vertical}
.pill{font-size:12px;border:1px solid var(--line-strong);border-radius:999px;padding:1px 10px;color:var(--muted)}
header.top{min-width:0}header.top .brand{min-width:0}.ai{white-space:nowrap}
@media (max-width:480px){header.top{gap:8px;padding:8px 12px}header.top .btn{font-size:14px;padding:6px 10px;min-height:40px}header.top .btn.help{max-width:118px;line-height:1.25;white-space:normal}header.top .brand span{font-size:16px}.ai{font-size:11px;padding:1px 6px}}


.notebook-document{line-height:1.75;overflow-wrap:anywhere}.notebook-document h2,.notebook-document h3{margin-top:1.4em}.notebook-document p{white-space:pre-wrap}.note-table-scroll{overflow-x:auto}.notebook-document table{width:100%;border-collapse:collapse;margin:16px 0}.notebook-document th,.notebook-document td{padding:12px;border:1px solid #d5cbbd;text-align:start;vertical-align:top}.notebook-document th{background:#e9e3d8;color:#1f2a44}.notebook-document tr:nth-child(even){background:#f6f1e8}.noteitem{display:block;width:100%;text-align:start}.notebook-document hr{border:0;border-top:1px solid #d5cbbd;margin:24px 0}
@media print{body *{visibility:hidden}.notebook-document,.notebook-document *{visibility:visible}.notebook-document{position:absolute;inset:0;background:white;color:black;padding:20px}.note-table-scroll{overflow:visible}.notebook-document table{font-size:10pt}.notebook-document tr{break-inside:avoid}}
/* 2.3.8: viewport workspace, compact menus and subject navigation */
[hidden]{display:none!important}
body.has-tabbar{height:100dvh;overflow:hidden}
body.has-tabbar .app{max-width:1440px;height:100dvh;min-height:0;padding-bottom:0}
body.has-tabbar header.top{flex:none;position:relative;padding:8px 18px;gap:8px}
header.top .btn,header.top summary{white-space:nowrap;font-size:14px;min-height:40px;padding:7px 12px}
header.top .brand{white-space:nowrap}
body.has-tabbar main{min-height:0;overflow:hidden;padding:0;display:grid;grid-template-columns:250px minmax(0,1fr);gap:0}
body.has-tabbar main > .screen{grid-column:2;min-width:0;min-height:0;overflow:auto;padding:18px 28px;gap:12px}
body.has-tabbar main > #s-chat{overflow:hidden;padding:8px 28px 0}
body.has-tabbar .chat{min-height:0;overflow:hidden;gap:6px}
body.has-tabbar .msgs{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:12px 0;scroll-padding:12px}
body.has-tabbar .composer{position:static;flex:none;padding:10px 0;margin:0;bottom:auto}
body.has-tabbar .composer textarea{min-height:46px}
body.has-tabbar .tabbar{position:static;flex:none;padding:4px 12px calc(4px + env(safe-area-inset-bottom));border-top:1px solid var(--line)}
body.has-tabbar .tabbar .tab{min-height:44px;flex-direction:row;gap:6px}
body.has-tabbar .tabbar .tab .ic{font-size:17px}
body.has-tabbar .app > footer{display:none}
#chatBar{flex:none;flex-wrap:nowrap;min-height:40px;position:relative;z-index:4}
#chatMode{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#stepTag,#voiceHint{flex:none}
.compact-menu{position:relative;font-size:14px;flex:none}
.compact-menu > summary{list-style:none;cursor:pointer;border:1px solid var(--line);border-radius:10px;padding:7px 12px;min-height:40px;background:var(--raised)}
.compact-menu > summary::after{content:' ▾'}
.compact-menu .menu-body{position:absolute;inset-inline-end:0;top:calc(100% + 8px);width:290px;max-width:85vw;max-height:65dvh;overflow:auto;padding:12px;background:var(--raised);border:1px solid var(--line);border-radius:14px;box-shadow:0 10px 32px #0002;display:flex;flex-direction:column;gap:8px;z-index:12}
.compact-menu .menu-body > .btn{text-align:start;width:100%;text-decoration:none}
.compact-menu .chips{flex-wrap:wrap;overflow:visible}
.compact-menu .voicepick{max-width:100%}
.history-pane{display:none}
body.has-tabbar .history-pane{display:flex;grid-column:1;grid-row:1;min-height:0;flex-direction:column;gap:12px;padding:20px 14px;background:var(--raised);border-inline-end:1px solid var(--line);overflow:hidden}
.history-pane h3{font-size:15px}.history-pane input{width:100%;font:inherit;font-size:14px;min-height:38px;padding:8px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--text)}
.history-list{overflow:auto;min-height:0;flex:1;display:flex;flex-direction:column;gap:4px}
.history-item{display:flex;flex-direction:column;text-align:start;gap:3px;border:0;border-radius:8px;background:transparent;color:var(--text);padding:10px;cursor:pointer;font-size:14px}
.history-item span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.history-item small{color:var(--muted);font-size:11px}.history-item:hover,.history-item[aria-current=true]{background:var(--accent-soft)}
.history-toggle{display:none}
#s-notes .notebook-tasks{border:1px solid var(--line);border-radius:12px;padding:10px 14px;background:var(--raised)}
.notebook-tasks summary{cursor:pointer;font-weight:500}.notebook-tasks .action-card{max-height:40dvh;overflow:auto;margin-top:10px;border:0;padding:4px}
.action-card label.check.plan{display:flex;flex-direction:row;align-items:flex-start;gap:10px;padding:10px 0;border-bottom:1px solid var(--line);font-weight:400}
#s-notes .action-card input[type=checkbox],#s-day .action-card input[type=checkbox]{width:20px;height:20px;min-height:20px;flex:0 0 20px;padding:0;margin-top:3px}
.action-card .plan span{font-size:15px;line-height:1.5;overflow-wrap:anywhere}
.notes{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:10px}
.noteitem{display:flex;flex-direction:column;align-items:stretch;text-align:start;gap:5px;padding:14px;min-width:0}
.noteitem p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.notebook-workspace{display:grid;grid-template-columns:210px minmax(0,1fr);gap:16px;min-height:0;align-items:start}
.notebook-subjects{display:flex;flex-direction:column;gap:8px;max-height:65dvh;overflow:auto}.note-subject{text-align:start;border-radius:8px;overflow-wrap:anywhere}
.notebook-editor{min-width:0;padding:16px}.notebook-editor textarea{min-height:45dvh!important;resize:vertical}.notebook-document{overflow-wrap:anywhere}.note-field-label{display:block;margin:6px 0;font-weight:600}.note-field-label[hidden]{display:none}.notebook-save-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.notebook-save-toast{max-width:min(90vw,28rem);text-align:center}
@media(max-width:900px){body.has-tabbar main{grid-template-columns:1fr}body.has-tabbar main > .screen{grid-column:1;padding:14px}body.has-tabbar main > #s-chat{padding:8px 14px 0}body.has-tabbar .history-pane{display:none}.history-toggle{display:inline-flex}body.has-tabbar .history-pane.open{display:flex;position:absolute;inset-inline-start:0;top:62px;bottom:60px;width:min(300px,86vw);z-index:10;box-shadow:0 10px 30px #0003}.notebook-workspace{grid-template-columns:1fr}.notebook-subjects{max-height:140px}.msg{max-width:94%}}
@media(max-width:520px){header.top{gap:5px;padding:7px 8px!important}header.top .brand{font-size:16px}header.top .brand svg{width:24px;height:24px}header.top .ai{font-size:10px;padding:1px 4px}header.top .btn,header.top summary{font-size:12px;padding:6px 8px}#chatMode{max-width:105px}body.has-tabbar .tabbar .tab{flex-direction:column;font-size:11px;gap:1px}.composer .btn{min-width:54px;padding:8px 10px}.notebook-editor .row{gap:6px}.notebook-editor .btn{font-size:13px;padding:7px 10px}}
.history-row{display:flex;align-items:flex-start;gap:2px;border-radius:8px}.history-row>.history-item{flex:1;min-width:0}.history-row[aria-current=true]{background:var(--accent-soft)}
.history-row details{flex:0 0 30px}.history-row summary{cursor:pointer;min-height:36px;text-align:center;list-style:none;font-size:22px}.history-row details[open]{flex-basis:100px;background:var(--surface);border:1px solid var(--line);border-radius:8px}.history-row details .btn{display:block;width:100%;font-size:12px;text-align:start;padding:6px;min-height:36px;border-radius:5px}
.account-dialog{max-width:520px;width:90%;max-height:85dvh;overflow:auto;border:1px solid var(--line);border-radius:18px;background:var(--raised);color:var(--text);padding:22px}.account-dialog::backdrop{background:#0006}.account-dialog p{margin:10px 0}.storage-total{font-size:30px;font-weight:600}

.note-action-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:16px;background:var(--accent-soft);border-radius:12px}.note-action-form label{display:grid;gap:6px}.note-action-form input{width:100%;box-sizing:border-box}.notebook-document table{min-width:460px}.notebook-document th{background:var(--accent-soft)}.notebook-document th,.notebook-document td{padding:12px;vertical-align:top}@media(max-width:600px){.note-action-form{grid-template-columns:1fr}}

