.records-sync{display:flex;justify-content:flex-end;gap:18px;min-height:36px;align-items:center;color:var(--muted,#747269);font-size:13px}.records-sync button{font:inherit;background:none;border:0;padding:8px;color:inherit;cursor:pointer}.records-sync[data-pending=true]{color:#925440}.records-signin{max-width:440px;margin:10vh auto}.records-cast{max-width:760px;margin:auto}.records-coin-table{display:flex;flex-direction:column;align-items:center;gap:32px;min-height:52dvh;justify-content:center}.records-coins{display:flex;gap:22px}.records-coins img{width:clamp(58px,14vw,92px);height:auto;filter:drop-shadow(0 8px 8px #0003)}.records-coins.tossing img{animation:records-toss .65s ease-in-out infinite}.records-coins.tossing img:nth-child(2){animation-delay:.12s}.records-coins.tossing img:nth-child(3){animation-delay:.22s}.records-cast-lines{display:flex;gap:12px;flex-wrap:wrap;justify-content:center;color:#efe5c9;font-size:13px}@keyframes records-toss{50%{transform:translateY(-30px) rotate(130deg) scaleX(.2)}}@media(prefers-reduced-motion:reduce){.records-coins.tossing img{animation:none}}@media(max-width:600px){.records-sync{font-size:12px;gap:8px}.records-cast h1{font-size:32px}.records-coin-table{min-height:48dvh}}dialog input,dialog textarea{scroll-margin-bottom:100px}

.prototype-note[hidden]{display:none!important}
.records-save-error{display:flex;flex-direction:column;align-items:flex-end;gap:2px;max-width:220px;white-space:normal;line-height:1.6}.records-save-error small{font:inherit;color:var(--muted)}.records-save-error button{min-height:44px;text-decoration:underline;text-underline-offset:3px}#toast[data-source=save]{white-space:normal;text-align:center}
body.tarot-desk-mode .topbar:has(.records-sync[data-pending=true]){display:flex;position:fixed;z-index:45;inset:auto 20px 24px auto;width:max-content;max-width:calc(100vw - 40px);height:auto;min-height:0;margin:0;padding:6px 12px;border:1px solid var(--line);border-radius:4px;background:var(--paper)}body.tarot-desk-mode .topbar:has(.records-sync[data-pending=true])>span{display:none}
body.tarot-desk-mode .topbar .records-home-return{display:none}
body.tarot-desk-mode .topbar .records-sync[data-save-state=saving]{min-height:24px}
body.tarot-desk-mode .records-sync[data-save-state=saving] [data-cloud=account]{display:none}
@media(max-width:620px){body.tarot-desk-mode .topbar:has(.records-sync[data-pending=true]){inset:auto 16px calc(76px + env(safe-area-inset-bottom,0px)) auto}}
.records-home-return{margin-left:auto;font-size:12px;color:var(--muted);white-space:nowrap;padding:12px 0 12px 12px}

@media(max-width:760px){.record-keyboard-open dialog{position:fixed;top:calc(var(--record-viewport-top,0px) + 12px);bottom:auto;margin-block:0;max-height:calc(var(--record-viewport-height,100dvh) - 24px);overflow:auto}}

.records-award-notice{margin-right:auto;color:var(--accent,#8c5235);text-decoration:none;padding:10px 0;min-height:44px}.records-sync{flex-wrap:wrap}

.page-foot[hidden]{display:none}.records-save-state{padding:8px 0}.records-sync [data-cloud="account"]{min-width:44px;min-height:44px;font-size:21px;letter-spacing:2px}.records-auth-actions{display:flex;justify-content:space-between;gap:20px;margin-top:24px}.records-auth-actions a{padding:12px 0;font-size:14px}.records-sync{min-height:44px}.records-signin{margin:24px auto}.records-tool-entry{max-width:980px;margin:24px auto}.records-tool-entry h1{font-size:32px;margin-bottom:24px}.records-ask-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.records-ask-tool{display:flex;align-items:center;gap:16px;padding:24px 18px;min-height:136px;background:var(--paper);color:var(--ink);text-decoration:none;border:1px solid var(--line);font:inherit;text-align:left;cursor:pointer}.records-ask-tool span{display:flex;flex-direction:column;gap:10px}.records-ask-tool strong{font-size:25px;font-weight:500}.records-ask-tool small{color:var(--muted);font-size:13px}.records-ask-tool b{margin-left:auto;font-size:22px;font-weight:400}.records-ask-tool:hover{border-color:#87775d}.records-ask-tool:focus-visible{outline:2px solid #8c5235;outline-offset:4px}@media(max-width:760px){.records-ask-tools{grid-template-columns:1fr;gap:16px}.records-ask-tool{padding:22px 18px;min-height:112px}.records-ask-tool strong{font-size:24px}.records-ask-tool small{font-size:12px}}

.records-backups{border-block:1px solid var(--line);padding:4px 0}.records-backups summary{cursor:pointer;min-height:44px;display:flex;align-items:center;justify-content:space-between}.records-backups summary::after{content:"＋";color:var(--muted)}.records-backups[open] summary::after{content:"−"}.records-backups .form-stack{padding:10px 0 16px;gap:10px}.records-backups .note{margin:0;line-height:1.8;font-size:12px;color:var(--muted)}

.records-backups summary{-webkit-tap-highlight-color:transparent;user-select:none}.records-backups button{text-align:left;min-height:44px}

.records-ritual-frame{display:block;border:0;width:100%;max-width:480px;height:max(640px,calc(100dvh - 112px));margin:0 auto;background:#f4efe5}
body:has(.records-ritual-frame) .topbar{display:none}body:has(.records-ritual-frame) #main{margin:0 auto;padding-top:0}body:has(.records-ritual-frame) .workspace{padding-top:0}
@media(max-width:620px){body:has(.records-ritual-frame) .workspace{padding-inline:0}.records-ritual-frame{height:max(640px,calc(100dvh - 112px - env(safe-area-inset-bottom,0px)))}}

/* Quiet when saved; actionable save feedback stays beside the record menu. */
.records-top-actions{margin-left:auto;display:flex;align-items:center;justify-content:flex-end;gap:16px;min-width:0}.records-top-actions .records-home-return{margin:0;padding:12px 0}.records-top-actions .records-sync{min-height:44px;gap:10px;font-size:12px}.records-top-actions .records-sync [data-cloud=account]{padding:6px;letter-spacing:1px}.topbar:has(.records-top-actions){gap:12px}.records-top-actions .records-award-notice{max-width:160px}.records-top-actions .records-sync[data-pending=true]{flex-wrap:wrap;max-width:280px}
body:has(.records-ritual-frame) .topbar:has(.records-top-actions){display:flex;min-height:44px;height:auto;padding:0 18px;border:0}body:has(.records-ritual-frame) .topbar>span,body:has(.records-ritual-frame) .records-home-return{display:none}
@media(max-width:620px){.records-top-actions{gap:8px}.topbar:has(.records-top-actions){min-height:54px;height:auto;padding-block:5px;font-size:11px}.records-top-actions .records-home-return{font-size:11px}.records-top-actions .records-sync{font-size:11px;gap:4px}.topbar:has(.records-sync[data-pending=true]){flex-wrap:wrap}.records-top-actions .records-sync[data-pending=true]{max-width:240px}.records-top-actions .records-award-notice{max-width:100px}.topbar .slash{margin-inline:8px}}

/* In the drawing room, save feedback shares the quiet header area. */
body.tarot-immersive-mode .topbar:has(.records-sync[data-pending=true]){inset:var(--desk-status-top,100px) clamp(24px,5vw,100px) auto auto;max-width:calc(100vw - 48px);padding:0;border:0;border-radius:0;background:var(--table,#303d31);color:#e8d9bb;box-shadow:none;min-height:44px}
body.tarot-immersive-mode .topbar .records-top-actions{gap:0;margin:0}
body.tarot-immersive-mode .topbar .records-sync{min-height:44px;gap:0;max-width:none;flex-wrap:nowrap;font-size:12px;color:#e8d9bb}
body.tarot-immersive-mode .topbar .records-sync [data-cloud=account],body.tarot-immersive-mode .topbar .records-award-notice{display:none}
body.tarot-immersive-mode .records-save-error{max-width:none;flex-direction:row;align-items:center;gap:14px;line-height:1.4}
body.tarot-immersive-mode .records-save-error small{display:none}
body.tarot-immersive-mode .records-save-error button{min-height:44px;padding:4px 0;color:#f3e5c6;white-space:nowrap}
body.tarot-immersive-mode .records-save-state{padding:0;color:#c6c8b9}
@media(max-width:620px){body.tarot-immersive-mode .topbar:has(.records-sync[data-pending=true]){right:max(16px,env(safe-area-inset-right,0px));max-width:calc(100vw - 32px)}body.tarot-immersive-mode .records-save-error{gap:12px}body.tarot-immersive-mode .topbar .records-sync{font-size:11px}}
@media(max-height:460px){body.tarot-immersive-mode .topbar:has(.records-sync[data-pending=true]),body.tarot-immersive-mode .topbar .records-sync,body.tarot-immersive-mode .records-save-error button{min-height:36px}}
