/* Create By Asking: styles for the working tools on the habit, Pomodoro, budget and wedding pages.
   Loaded after style.css; reuses its tokens and the dark .game-shell look. */

.tool-shell { background: var(--screen); border-radius: 18px; padding: clamp(14px, 3vw, 28px); color: #F2ECFF; display: grid; gap: 18px; }
.tool-shell h3 { color: #fff; }
.tool-shell .btn { background: #FFC93C; color: #1C0F3F; }
.tool-shell .btn-ghost { background: rgba(255, 255, 255, 0.08); color: #fff; border: 0; }
.tool-shell .btn-ghost:hover { background: rgba(255, 255, 255, 0.16); }
.tool-shell input, .tool-shell select { background: rgba(255, 255, 255, 0.08); border: 1.5px solid transparent; color: #fff; border-radius: 10px; padding: 10px 12px; font: inherit; min-width: 0; }
.tool-shell input:focus, .tool-shell select:focus { outline: none; border-color: #FFC93C; }
.tool-shell select option { color: #1C0F3F; }
.tool-shell input::placeholder { color: #A597CC; }
.tool-note { font-size: 0.78rem; color: #A597CC; }
.tool-empty { color: #A597CC; font-size: var(--step--1); list-style: none; }
.tool-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.icon-btn { border: 0; width: 36px; height: 36px; border-radius: 9px; background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 1rem; cursor: pointer; }
.icon-btn:disabled { opacity: 0.3; cursor: default; }
.chip-dark { border: 0; border-radius: 999px; padding: 7px 13px; background: rgba(255, 255, 255, 0.08); color: #CBBFE8; font: 600 var(--step--1)/1 var(--body); cursor: pointer; }
.chip-dark[aria-pressed="true"] { background: #FFC93C; color: #1C0F3F; }

/* ---------- habit tracker ---------- */
.habit-head { display: flex; align-items: center; gap: 10px; }
.habit-head h3 { font-size: var(--step-2); min-width: 9.5em; text-align: center; }
.habit-progress { flex: 1 1 240px; display: grid; gap: 6px; }
.habit-progress div { display: flex; justify-content: space-between; font-size: var(--step--1); color: #CBBFE8; }
.habit-progress b { color: #fff; font-variant-numeric: tabular-nums; }
.track { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.track span { display: block; height: 100%; background: #FFC93C; border-radius: 99px; transition: width 0.3s; }
.habit-grid { overflow-x: auto; border-radius: 10px; background: rgba(255, 255, 255, 0.03); }
.habit-grid table { border-collapse: separate; border-spacing: 3px; font-size: 0.72rem; }
.habit-grid thead th { color: #A597CC; font: 600 0.68rem/1 var(--mono); padding: 6px 0; min-width: 26px; text-align: center; }
.habit-grid thead th.is-today { color: #FFC93C; }
.habit-grid .h-name { position: sticky; left: 0; z-index: 1; background: var(--screen); text-align: left; min-width: 270px; max-width: 300px; padding: 4px 8px 4px 4px; }
.habit-grid tbody .h-name { display: grid; grid-template-columns: 10px 1fr auto auto; gap: 8px; align-items: center; }
.h-dot { width: 10px; height: 10px; border-radius: 3px; }
.h-label { border: 0; background: none; color: #fff; font: 600 0.85rem/1.25 var(--body); text-align: left; padding: 0; cursor: pointer; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.h-streak { font: 600 0.78rem/1 var(--mono); color: #fff; white-space: nowrap; }
.h-streak small { color: #A597CC; font-weight: 400; }
.h-del { border: 0; background: none; color: #A597CC; font-size: 1rem; cursor: pointer; padding: 0 2px; }
.h-del:hover { color: #FF7A62; }
.cell { width: 26px; height: 26px; border: 0; border-radius: 6px; background: rgba(255, 255, 255, 0.08); cursor: pointer; display: block; }
.cell:hover:not(:disabled) { background: rgba(255, 255, 255, 0.2); }
.cell:disabled { opacity: 0.25; cursor: default; }
td.is-today .cell { box-shadow: inset 0 0 0 2px #FFC93C; }
.habit-add { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.habit-add input { flex: 1 1 200px; }
.swatches { display: flex; gap: 6px; }
.swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.swatch[aria-pressed="true"] { border-color: #fff; }
@media (max-width: 600px) {
  .habit-grid .h-name { min-width: 150px; max-width: 160px; }
  .habit-grid tbody .h-name { grid-template-columns: 8px 1fr auto auto; gap: 5px; }
  .h-streak small { display: none; }
  .h-label { font-size: 0.78rem; }
}

/* ---------- pomodoro ---------- */
.pomo { --pomo: #FF7A62; display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: center; }
.pomo[data-state="short"], .pomo[data-state="long"] { --pomo: #5BD48F; }
.pomo-main { display: grid; justify-items: center; gap: 18px; }
.pomo-modes { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pomo-modes .chip-dark[aria-pressed="true"] { background: var(--pomo); color: #1C0F3F; }
.pomo-dial { position: relative; width: min(320px, 78vw); aspect-ratio: 1; }
.pomo-dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pomo-dial circle { fill: none; stroke-width: 6; }
.pomo-dial .bg { stroke: rgba(255, 255, 255, 0.08); }
.pomo-dial .fg { stroke: var(--pomo); stroke-linecap: round; transition: stroke-dashoffset 0.25s linear, stroke 0.3s; }
.pomo-read { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 4px; }
.pomo-read strong { font: 800 clamp(3rem, 12vw, 4.6rem)/1 var(--display); font-variant-numeric: tabular-nums; color: #fff; letter-spacing: -0.02em; }
.pomo-read span { font: 600 0.75rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--pomo); }
.pomo-ctrl { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.pomo-ctrl .btn:not(.btn-ghost) { background: var(--pomo); min-width: 120px; justify-content: center; }
.pomo-side { display: grid; gap: 16px; align-content: start; }
.pomo-dots { display: flex; gap: 8px; }
.pomo-dot { width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); }
.pomo-dot.on { background: #FF7A62; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18); }
.pomo-side .score span { margin-bottom: 6px; }
.pomo-today { font-size: var(--step--1); color: #fff; }
.pomo-presets { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 820px) { .pomo { grid-template-columns: 1fr; } }

/* ---------- budget tracker ---------- */
.b-banner { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; background: rgba(255, 201, 60, 0.12); border-radius: 10px; padding: 10px 14px; font-size: var(--step--1); color: #FFE08F; }
.b-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.b-stats .score strong { font-size: clamp(1.3rem, 4vw, 1.9rem); }
.b-stats .score strong.neg { color: #FF7A62; }
.b-stats input { width: 100%; font: 800 clamp(1.3rem, 4vw, 1.9rem)/1.1 var(--display); padding: 0; background: none; border: 0; border-bottom: 1.5px dashed rgba(255, 255, 255, 0.25); border-radius: 0; }
.b-summary { color: #CBBFE8; font-size: var(--step--1); }
.b-body { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; }
.b-cats { display: grid; gap: 12px; }
.b-cat-top { display: flex; justify-content: space-between; gap: 8px; font-size: var(--step--1); align-items: center; }
.b-cat-top span { display: flex; gap: 8px; align-items: center; color: #fff; font-weight: 600; }
.b-cat-top i, .b-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.b-budget { border: 0; background: none; color: #CBBFE8; font: 500 0.8rem/1 var(--mono); cursor: pointer; padding: 2px 0; text-decoration: underline dotted; text-underline-offset: 3px; }
.b-track { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin-top: 6px; }
.b-fill { height: 100%; border-radius: 99px; }
.b-fill.ok { background: #5BD48F; }
.b-fill.near { background: #FFB04D; }
.b-fill.over { background: #FF7A62; }
.b-over { color: #FF7A62; font-size: 0.78rem; }
.b-chart { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: center; }
.b-chart canvas { width: 150px; height: 150px; }
.b-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 0.8rem; color: #CBBFE8; }
.b-legend li { display: flex; gap: 8px; align-items: center; }
.b-legend b { color: #fff; margin-left: auto; font-variant-numeric: tabular-nums; }
.b-right { display: grid; gap: 18px; align-content: start; }
.b-add { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.b-add .btn { grid-column: 1 / -1; justify-content: center; }
.b-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.b-list li { display: grid; grid-template-columns: 52px 1fr auto 24px; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); font-size: var(--step--1); }
.b-when { color: #A597CC; font: 500 0.75rem/1 var(--mono); }
.b-what { color: #fff; display: grid; line-height: 1.3; }
.b-what small { color: #A597CC; }
.b-list b { color: #fff; font-variant-numeric: tabular-nums; }
.b-del { border: 0; background: none; color: #A597CC; cursor: pointer; font-size: 1rem; }
.b-del:hover { color: #FF7A62; }
@media (max-width: 860px) { .b-body { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .b-stats { grid-template-columns: 1fr 1fr; } .b-stats .score:last-child { grid-column: 1 / -1; } .b-chart { grid-template-columns: 120px 1fr; } .b-chart canvas { width: 120px; height: 120px; } }

/* ---------- wedding example frame ---------- */
.browser { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 18px 40px -24px rgba(28, 15, 63, 0.35); }
.browser-bar { display: flex; gap: 6px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.browser-bar .url { margin-left: 10px; flex: 1; min-width: 0; font: 500 0.78rem/1 var(--mono); color: var(--muted); background: var(--paper); border-radius: 6px; padding: 7px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser-bar a { font-size: var(--step--1); font-weight: 600; white-space: nowrap; }
.browser iframe { display: block; width: 100%; height: min(640px, 75vh); border: 0; background: #FBF8F1; }
