/* Compact interactions, shared by desktop and mobile. */
.floating-widget--worldClock .floating-widget-body,
.floating-widget--game .floating-widget-body { display: block; overflow: auto; }
.world-clock-widget { min-width: 0; width: 100%; }
.clock-list { gap: 8px; min-height: 0; }
.clock-item { grid-template-columns: minmax(0,1fr) auto 22px; gap: 7px; padding: 12px 10px; border-radius: 14px; background: linear-gradient(120deg,rgba(251,191,36,.08),rgba(56,189,248,.06)); }
.clock-item.clock-night { background: linear-gradient(120deg,rgba(99,102,241,.15),rgba(30,41,59,.08)); }
.clock-city-main { gap: 8px; }
.clock-city-main > div { min-width: 0; }
.clock-emoji { width: 36px; height: 24px; border-radius: 4px; overflow: hidden; background: none; }
.clock-flag { display: block; width: 36px; height: 24px; object-fit: cover; border-radius: 4px; box-shadow: 0 0 0 1px rgba(127,127,127,.2); }
.clock-city-main strong { font-size: .86rem; }
.clock-time-block strong { font-size: 1.55rem; line-height: 1.1; letter-spacing: -.04em; }
.clock-time-block span { display: block; margin-top: 3px; font-size: .67rem; }
.clock-time-block .clock-relative { color: var(--text-soft); }
.clock-remove { width: 22px; height: 26px; }
.clock-add-row .loan-input { min-width: 0; }
/* Game board stays readable even inside a short widget. */
.ttt-widget { width: 100%; min-height: 310px; height: 100%; gap: 9px; }
.ttt-topbar { gap: 6px; flex-wrap: wrap; }
.ttt-mode-switch { padding: 3px; gap: 2px; }
.ttt-mode-btn { font-size: .72rem; padding: 6px 8px; }
.ttt-turn-pill { font-size: .72rem; padding: 6px 9px; }
.ttt-scoreboard { gap: 6px; }
.ttt-score-card { border-radius: 10px; padding: 6px; display: flex; align-items: center; justify-content: center; gap: 7px; }
.ttt-score-label { letter-spacing: 0; text-transform: none; margin: 0; font-size: .7rem; color: var(--text-soft); }
.ttt-score-card strong { font-size: 1rem; }
.ttt-board { flex: 1; min-height: 174px; grid-template-rows: repeat(3,minmax(52px,1fr)); gap: 6px; }
.ttt-cell { min-height: 52px; border-radius: 12px; font-size: 2.2rem; line-height: 1; border-color: rgba(148,163,184,.3); background: rgba(127,127,127,.07); }
.ttt-cell:disabled { opacity: 1; }
.ttt-cell.is-x { color: #fb923c; }
.ttt-cell.is-o { color: #38bdf8; }
body.light .ttt-cell.is-x { color: #c2410c; }
body.light .ttt-cell.is-o { color: #0369a1; }
.ttt-cell.is-winning, body.light .ttt-cell.is-winning { background: rgba(34,197,94,.17); border-color: #22c55e; box-shadow: inset 0 0 0 1px #22c55e; }
.ttt-cell.just-played { animation: ttt-place 180ms ease-out; }
.ttt-status { font-size: .8rem; min-height: 1.1em; }
.ttt-actions { display: flex; flex-direction: row; flex-wrap: wrap; gap: 5px; }
.ttt-actions .btn { padding: 7px 10px; font-size: .72rem; }
.ttt-actions [data-ttt-reset-score] { margin-left: auto; }
@keyframes ttt-place { from { transform: scale(.84); } to { transform: scale(1); } }
/* Notes: one row of tabs; secondary actions in a contextual menu. */
.notes-layer-panel { gap: 4px; position: relative; }
.notes-layer-topline { display: flex; gap: 4px; align-items: center; min-width: 0; }
.notes-layer-tabs { flex: 1; min-width: 0; gap: 4px; padding: 2px; }
.notes-layer-tab, .notes-layered-host--compact .notes-layer-tab { padding: 6px 8px; border-radius: 8px; max-width: 150px; box-shadow: none; }
.notes-layer-tab.active, body.light .notes-layer-tab.active { color: var(--text-main); background: color-mix(in srgb,var(--layer-color) 15%,transparent); border-color: var(--layer-color); box-shadow: inset 0 -2px 0 var(--layer-color); }
.notes-layer-dot { width: 6px; height: 6px; box-shadow: none; }
.notes-layer-add, .notes-expand, .notes-more summary { width: 28px; height: 30px; padding: 0; flex: 0 0 auto; border-radius: 8px; display: grid; place-items: center; }
.notes-more { flex: 0 0 auto; }
.notes-more summary { cursor: pointer; list-style: none; font-size: 20px; color: var(--text-soft); }
.notes-more summary::-webkit-details-marker { display: none; }
.notes-more[open] summary { background: rgba(56,189,248,.16); }
.notes-more .notes-layer-tools { position: absolute; z-index: 20; right: 0; top: 35px; width: min(270px,100%); padding: 10px; border: 1px solid var(--panel-border); background: #142033; box-shadow: 0 12px 26px #0004; border-radius: 12px; grid-template-columns: 1fr 1fr; }
body.light .notes-more .notes-layer-tools { background: #f8fafc; }
.notes-more .notes-layer-search { grid-column: 1 / -1; padding: 7px; }
.notes-more .notes-layer-tool { padding: 7px; }
.notes-layer-meta { display: flex; justify-content: space-between; gap: 10px; font-size: .65rem; }
.notes-save-error { color: #f97316; font-weight: 700; }
.notes-layered-host .quick-notes { padding: 12px; line-height: 1.65; font-size: .9rem; border-radius: 10px; min-height: 60px; }
.notes-layered-host { gap: 6px; }
.notes-focus-dialog { width: min(860px,calc(100vw - 24px)); height: min(760px,calc(100dvh - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 20px; border: 1px solid var(--panel-border); border-radius: 20px; background: #111c2f; color: var(--text-main); }
.notes-focus-dialog::backdrop { background: #0009; backdrop-filter: blur(5px); }
body.light .notes-focus-dialog { background: #f8fafc; }
.notes-focus-dialog[open] { display: flex; flex-direction: column; gap: 14px; }
.notes-focus-dialog header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.notes-focus-dialog h2 { margin: 0; font-size: 1.2rem; }
.notes-focus-content { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.notes-focus-content .quick-notes { width: 100%; resize: none; }
.notes-focus-content .notes-expand { display: none; }
/* Agenda is outside the calendar widget so it never reserves layout space. */
.calendar-agenda-preview { position: fixed; z-index: 11000; width: min(310px,calc(100vw - 16px)); max-height: calc(100dvh - 16px); overflow: auto; padding: 12px; border: 1px solid rgba(148,163,184,.3); border-radius: 16px; background: #142033; color: var(--text-main); box-shadow: 0 18px 55px #0006; }
body.light .calendar-agenda-preview { background: #fff; }
.calendar-agenda-preview header { display: flex; align-items: center; gap: 8px; justify-content: space-between; font-size: .86rem; text-transform: capitalize; }
.calendar-agenda-preview header button { background: transparent; color: inherit; border: 0; font-size: 22px; cursor: pointer; padding: 0 6px; }
.agenda-preview-list { display: grid; gap: 5px; margin: 10px 0; max-height: 220px; overflow: auto; }
.agenda-preview-list p { font-size: .8rem; color: var(--text-soft); margin: 6px 0; }
.agenda-preview-event { display: grid; grid-template-columns: 24px minmax(0,1fr) 12px; align-items: center; gap: 6px; border: 1px solid transparent; border-radius: 9px; padding: 9px 6px; text-align: left; color: inherit; background: rgba(127,127,127,.09); cursor: pointer; font: inherit; }
.agenda-preview-event:hover { border-color: #38bdf8; }
.agenda-preview-event strong { display: block; font-size: .82rem; overflow-wrap: anywhere; }
.agenda-preview-event small { font-size: .7rem; opacity: .65; }
.calendar-agenda-preview > .btn { width: 100%; font-size: .8rem; }
.ttt-cell:focus-visible, .ttt-mode-btn:focus-visible, .notes-more summary:focus-visible, .notes-layer-tab:focus-visible, .notes-expand:focus-visible, .agenda-preview-event:focus-visible { outline: 2px solid #38bdf8; outline-offset: 2px; }
@media (max-width: 640px) { .ttt-topbar { flex-direction: row; } .ttt-mode-switch { width: auto; } .ttt-widget { min-height: 390px; } .notes-focus-dialog { padding: 12px; } }
@media (prefers-reduced-motion: reduce) { .ttt-cell.just-played { animation: none; } .ttt-cell, .notes-layer-tab { transition: none; } }
.floating-widget--notes .floating-widget-body { overflow: auto; }
