/* =====================================================================
   Study tools (/tools/study and /my/flashcards, /my/planner).
   Night palette from ph-theme.css / ph-student.css. Prefix: ts-
   ===================================================================== */
.ts-narrow { max-width: 860px; }
.ts-hint { color: var(--ph-muted); font-size: .88rem; margin: .9rem 0 0; line-height: 1.6; }
.ts-tag { display: inline-flex; align-items: center; font-size: .74rem; font-weight: 700; letter-spacing: .02em; color: #F08CFF; border: 1px solid rgba(225, 28, 242, .35); border-radius: 6px; padding: .15rem .5rem; white-space: nowrap; }
/* Component display rules below would otherwise beat the hidden attribute. */
:is(.ts-player, .ts-mcq, [data-ts-filter], .ts-pomo) [hidden] { display: none !important; }
.ts-err { display: block; color: var(--ph-red); font-size: .82rem; margin-top: .3rem; }

/* ---------- Index ---------- */
.ts-group { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 28px 0; border-top: 1px solid var(--ph-line); }
.ts-group:first-child { border-top: 0; padding-top: 0; }
.ts-group-title { font-size: 1.05rem; color: var(--ph-muted); font-weight: 600; margin: 0; letter-spacing: .01em; }
.ts-tools { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.ts-tool, .ts-deck { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; background: var(--ph-surface); border: 1px solid var(--ph-line); border-radius: 10px; color: var(--ph-text); text-decoration: none; transition: border-color .2s, background-color .2s; min-height: 44px; }
.ts-tool:hover, .ts-deck:hover { border-color: rgba(225, 28, 242, .55); background: var(--ph-surface2); color: var(--ph-text); }
.ts-tool:focus-visible, .ts-deck:focus-visible { outline: 2px solid var(--ph-magenta); outline-offset: 2px; }
.ts-tool-ic { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 8px; background: rgba(225, 28, 242, .1); color: #F08CFF; }
.ts-tool-ic .icon { width: 20px; height: 20px; }
.ts-tool-body, .ts-deck-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.ts-tool-body strong, .ts-deck-body strong { color: var(--ph-ink); font-size: 1.02rem; }
.ts-tool-body span, .ts-deck-body > span:not(.ts-deck-meta) { color: var(--ph-muted); font-size: .92rem; line-height: 1.55; }
.ts-tool-body small { color: #F08CFF; font-size: .8rem; font-weight: 600; }
.ts-tool-go { flex: none; width: 18px; height: 18px; color: var(--ph-muted); margin-top: 12px; transition: transform .2s, color .2s; }
.ts-tool:hover .ts-tool-go, .ts-deck:hover .ts-tool-go { transform: translateX(3px); color: #F08CFF; }
@media (min-width: 760px) {
  .ts-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .ts-group { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 32px; }
  .ts-group-title { padding-top: 14px; }
}

/* ---------- Notes and banners ---------- */
.ts-note { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 14px 16px; margin-bottom: 22px; border: 1px solid var(--ph-line2); border-left: 3px solid var(--ph-magenta); border-radius: 8px; background: var(--ph-surface); }
.ts-note > .icon { width: 20px; height: 20px; color: #F08CFF; flex: none; }
.ts-note p { flex: 1 1 240px; margin: 0; color: var(--ph-text); font-size: .93rem; line-height: 1.55; }
.ts-note b { color: var(--ph-ink); }

/* ---------- Deck list ---------- */
.ts-decks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.ts-deck-count { flex: none; width: 64px; text-align: center; padding: 8px 0; border-right: 1px solid var(--ph-line); margin-right: 2px; }
.ts-deck-count b { display: block; font-size: 1.5rem; line-height: 1.1; color: var(--ph-ink); font-family: "Space Grotesk", var(--ph-font); }
.ts-deck-count small { color: var(--ph-muted); font-size: .76rem; }
.ts-deck-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .8rem; color: var(--ph-muted); }
.ts-due { color: #FFC94A; font-weight: 700; font-size: .82rem; white-space: nowrap; }
@media (min-width: 900px) { .ts-decks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Flashcard player ---------- */
.ts-modes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.ts-modes a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--ph-line2); border-radius: 8px; color: var(--ph-text); font-weight: 600; font-size: .92rem; }
.ts-modes a.active { background: var(--ph-surface3); border-color: rgba(225, 28, 242, .6); color: var(--ph-ink); }
.ts-modes-note { color: var(--ph-muted); font-size: .92rem; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ts-modes-note .icon { width: 16px; height: 16px; }
.ts-modes-note a { color: #F08CFF; font-weight: 600; }
.ts-deck-stats { display: flex; gap: 18px; margin: 0 0 14px; color: var(--ph-muted); font-size: .9rem; }
.ts-deck-stats b { color: var(--ph-ink); font-size: 1.05rem; }
.ts-bar { height: 4px; border-radius: 4px; background: var(--ph-line); overflow: hidden; }
.ts-bar-fill { display: block; height: 100%; width: 0; background: var(--ph-grad); transition: width .3s ease-out; }
.ts-pos { color: var(--ph-muted); font-size: .85rem; margin: 8px 0 12px; }
.ts-card { display: grid; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; perspective: 1400px; font: inherit; color: inherit; text-align: center; }
.ts-face { grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 260px; padding: 34px 22px; border: 1px solid var(--ph-line2); border-radius: 12px; background: var(--ph-surface); backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .45s cubic-bezier(.2, .7, .2, 1); overflow-wrap: anywhere; }
.ts-face small { position: absolute; top: 14px; left: 18px; font-size: .74rem; color: var(--ph-muted); letter-spacing: .04em; text-transform: uppercase; }
.ts-face { position: relative; }
.ts-face-text { font-size: clamp(1.15rem, 1rem + 1vw, 1.6rem); line-height: 1.45; color: var(--ph-ink); max-width: 34ch; white-space: pre-line; }
.ts-back { transform: rotateY(180deg); background: var(--ph-surface2); border-color: rgba(225, 28, 242, .45); }
.ts-back .ts-face-text { font-size: clamp(1.02rem, .95rem + .6vw, 1.3rem); color: var(--ph-text); }
.ts-back img { max-width: 100%; max-height: 200px; height: auto; border-radius: 8px; }
.ts-card.is-flipped .ts-front { transform: rotateY(-180deg); }
.ts-card.is-flipped .ts-back { transform: rotateY(0); }
.ts-card:focus-visible .ts-face { outline: 2px solid var(--ph-magenta); outline-offset: 3px; }
.ts-card[hidden] { display: none; }
.ts-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.ts-controls .btn { min-height: 46px; }
.ts-controls .icon { width: 18px; height: 18px; }
.ts-wide { min-width: min(260px, 100%); }
.ts-rate { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.ts-rate.is-busy { opacity: .6; pointer-events: none; }
.ts-rate-btn { display: grid; gap: 2px; min-height: 58px; padding: 8px; border: 1px solid var(--ph-line2); border-radius: 8px; background: var(--ph-surface); color: var(--ph-ink); font: inherit; cursor: pointer; transition: border-color .15s, background-color .15s; }
.ts-rate-btn b { font-size: .98rem; }
.ts-rate-btn small { color: var(--ph-muted); font-size: .76rem; }
.ts-rate-btn:hover, .ts-rate-btn:focus-visible { background: var(--ph-surface2); outline: none; }
.r-again { border-bottom: 3px solid var(--ph-red); }
.r-hard { border-bottom: 3px solid var(--ph-yellow); }
.r-good { border-bottom: 3px solid var(--ph-green); }
.r-easy { border-bottom: 3px solid #A9B3FF; }
.r-again:hover { border-color: var(--ph-red); }
.r-hard:hover { border-color: var(--ph-yellow); }
.r-good:hover { border-color: var(--ph-green); }
.r-easy:hover { border-color: #A9B3FF; }
.ts-player .ts-hint { text-align: center; }
@media (min-width: 560px) { .ts-rate { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 760px) { .ts-face { min-height: 320px; } }

.ts-done { text-align: center; padding: 34px 18px; border: 1px solid var(--ph-line2); border-radius: 12px; background: var(--ph-surface); }
.ts-done > .icon { width: 40px; height: 40px; color: var(--ph-green); }
.ts-done h3 { color: var(--ph-ink); margin: 10px 0 6px; }
.ts-done p { color: var(--ph-muted); max-width: 52ch; margin: 0 auto; }
.ts-done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.ts-done[hidden] { display: none; }

/* ---------- MCQ maker ---------- */
.ts-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.ts-panel { background: var(--ph-surface); border: 1px solid var(--ph-line); border-radius: 10px; padding: 18px; }
.ts-panel .field label { color: var(--ph-ink); }
.ts-notes { min-height: 220px; resize: vertical; font-size: 16px; line-height: 1.6; }
.ts-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.ts-row .field { margin: 0; flex: 0 1 160px; }
.ts-row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.ts-row-actions .btn { min-height: 46px; }
.ts-quiz { min-height: 260px; }
.ts-quiz-empty { display: grid; place-items: center; gap: 8px; text-align: center; min-height: 220px; color: var(--ph-muted); }
.ts-quiz-empty .icon { width: 34px; height: 34px; color: #F08CFF; }
.ts-quiz .ts-done { border: 0; background: none; }
.ts-q { color: var(--ph-ink); font-size: 1.08rem; line-height: 1.65; margin: 0 0 14px; overflow-wrap: anywhere; }
.ts-opts { display: grid; gap: 8px; }
.ts-opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 10px 14px; text-align: left; border: 1px solid var(--ph-line2); border-radius: 8px; background: var(--ph-soft); color: var(--ph-text); font: inherit; cursor: pointer; transition: border-color .15s, background-color .15s; overflow-wrap: anywhere; }
.ts-opt b { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; background: var(--ph-surface3); color: var(--ph-ink); font-size: .85rem; }
.ts-opt:hover:not(:disabled) { border-color: rgba(225, 28, 242, .6); }
.ts-opt:disabled { cursor: default; }
.ts-opt.is-right { border-color: var(--ph-green); background: rgba(46, 211, 138, .1); color: var(--ph-ink); }
.ts-opt.is-right b { background: var(--ph-green); color: #0A0118; }
.ts-opt.is-wrong { border-color: var(--ph-red); background: rgba(255, 77, 109, .1); }
.ts-opt.is-wrong b { background: var(--ph-red); }
.ts-feedback { min-height: 1.5em; margin: 12px 0; font-weight: 600; }
.ts-feedback.ok { color: var(--ph-green); }
.ts-feedback.bad { color: #FF8FA3; }
@media (min-width: 960px) {
  .ts-split { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .ts-quiz { position: sticky; top: 96px; }
}

/* ---------- Search and filters ---------- */
.ts-search { display: flex; align-items: center; gap: 8px; position: relative; margin-bottom: 16px; }
.ts-search > .icon { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--ph-muted); pointer-events: none; }
.ts-search .input { flex: 1; min-width: 0; padding-left: 42px; font-size: 16px; min-height: 46px; }
.ts-search .btn { min-height: 46px; flex: none; }
.ts-filterbar { display: grid; gap: 10px; margin-bottom: 18px; }
.ts-filterbar .ts-search { margin: 0; }
.ts-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ts-chips .chip { font: inherit; cursor: pointer; border: 0; min-height: 40px; }
.ts-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--ph-line); margin-bottom: 20px; scrollbar-width: none; }
.ts-tabs::-webkit-scrollbar { display: none; }
.ts-tabs a { flex: none; display: inline-flex; align-items: center; min-height: 46px; padding: 0 14px; color: var(--ph-muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ts-tabs a:hover { color: var(--ph-ink); }
.ts-tabs a.active { color: var(--ph-ink); border-bottom-color: var(--ph-magenta); }

/* ---------- Mnemonics ---------- */
.ts-mnemonics { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 20px; }
.ts-mn { display: grid; grid-template-columns: minmax(0, 1fr); background: var(--ph-surface); border: 1px solid var(--ph-line); border-radius: 10px; overflow: hidden; }
.ts-mn-word { padding: 14px 18px; font-family: "Space Grotesk", var(--ph-font); font-weight: 700; font-size: 1.6rem; letter-spacing: .08em; color: #F08CFF; border-bottom: 1px solid var(--ph-line); overflow-wrap: anywhere; }
.ts-mn-body { padding: 16px 18px; }
.ts-mn-body h2 { font-size: 1.05rem; color: var(--ph-ink); margin: 0 0 10px; }
.ts-mn-body ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ts-mn-body li { display: flex; gap: 10px; color: var(--ph-text); line-height: 1.5; font-size: .95rem; }
.ts-mn-body li b { flex: none; min-width: 26px; color: var(--ph-ink); font-family: "Space Grotesk", var(--ph-font); }
.ts-mn-tags { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 12px 0 0; font-size: .8rem; color: var(--ph-muted); }
.ts-mn-tags a { color: var(--ph-muted); text-decoration: underline; text-decoration-color: var(--ph-line2); text-underline-offset: 3px; }
.ts-mn-tags a:hover { color: #F08CFF; }
@media (min-width: 760px) {
  .ts-mn { grid-template-columns: minmax(0, 180px) minmax(0, 1fr); }
  .ts-mn-word { border-bottom: 0; border-right: 1px solid var(--ph-line); display: flex; align-items: center; justify-content: center; text-align: center; font-size: 1.5rem; }
}
@media (min-width: 1200px) { .ts-mnemonics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Reference charts ---------- */
.ts-refs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.ts-ref, .ts-flowcard { background: var(--ph-surface); border: 1px solid var(--ph-line); border-radius: 10px; padding: 18px; scroll-margin-top: 100px; }
.ts-ref[hidden], .ts-flowcard[hidden] { display: none; }
.ts-ref header, .ts-flowcard header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ts-ref h2, .ts-flowcard h2 { font-size: 1.08rem; color: var(--ph-ink); margin: 0; }
.ts-ref-en { color: var(--ph-muted); font-size: .85rem; margin: 2px 0 0; }
.ts-ref-sum { color: var(--ph-text); font-size: .93rem; line-height: 1.6; margin: 8px 0 0; }
.ts-dl { margin: 12px 0 0; display: grid; gap: 0; }
.ts-dl > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 9px 0; border-top: 1px solid var(--ph-line); }
.ts-dl dt { color: #F08CFF; font-size: .78rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.ts-dl dd { margin: 0; color: var(--ph-text); font-size: .93rem; line-height: 1.6; overflow-wrap: anywhere; }
@media (min-width: 640px) { .ts-dl > div { grid-template-columns: minmax(0, 150px) minmax(0, 1fr); gap: 14px; } }
@media (min-width: 1100px) { .ts-refs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.ts-flows { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.ts-flow { list-style: none; margin: 16px 0 0; padding: 0; }
.ts-flow li { position: relative; display: flex; align-items: flex-start; gap: 12px; padding-bottom: 14px; }
.ts-flow li:last-child { padding-bottom: 0; }
.ts-flow li::before { content: ""; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: linear-gradient(var(--ph-magenta), rgba(138, 43, 245, .35)); }
.ts-flow li:last-child::before { display: none; }
.ts-flow-n { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(225, 28, 242, .6); background: var(--ph-bg2); color: var(--ph-ink); font-size: .82rem; font-weight: 700; position: relative; z-index: 1; }
.ts-flow-t { flex: 1; min-width: 0; padding: 6px 12px; border: 1px solid var(--ph-line); border-radius: 8px; background: var(--ph-soft); color: var(--ph-text); font-size: .94rem; line-height: 1.55; overflow-wrap: anywhere; }
.ts-flow li:last-child .ts-flow-t { border-color: rgba(225, 28, 242, .45); color: var(--ph-ink); }
@media (min-width: 1100px) { .ts-flows { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- 3D anatomy ---------- */
.ts-models { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.ts-model { background: var(--ph-surface); border: 1px solid var(--ph-line); border-radius: 10px; overflow: hidden; }
.ts-model-media { position: relative; aspect-ratio: 16 / 10; background: var(--ph-bg2); display: grid; place-items: center; }
.ts-model-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .7; }
.ts-model-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ts-model-ph .icon { width: 44px; height: 44px; color: var(--ph-line2); }
.ts-model-open { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); min-height: 44px; }
.ts-model-body { padding: 12px 16px 14px; }
.ts-model-body h2 { font-size: 1rem; color: var(--ph-ink); margin: 0; }
.ts-model-body small { color: var(--ph-muted); }
@media (min-width: 760px) { .ts-models { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Pomodoro ---------- */
.ts-pomo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.ts-pomo-main { text-align: center; padding: 26px 16px; border: 1px solid var(--ph-line2); border-radius: 12px; background: var(--ph-surface); }
.ts-pomo-modes { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 4px; border: 1px solid var(--ph-line); border-radius: 10px; }
.ts-pomo-modes button { min-height: 44px; padding: 0 14px; border: 0; border-radius: 7px; background: none; color: var(--ph-muted); font: inherit; font-weight: 600; cursor: pointer; }
.ts-pomo-modes button.active { background: var(--ph-surface3); color: var(--ph-ink); }
.ts-pomo-clock { font-family: "Space Grotesk", var(--ph-font); font-size: clamp(4rem, 3rem + 7vw, 7.5rem); font-weight: 700; line-height: 1; color: var(--ph-ink); margin: 28px 0 18px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ts-pomo-ring { height: 6px; max-width: 420px; margin: 0 auto; border-radius: 6px; background: var(--ph-line); overflow: hidden; }
.ts-pomo-ring span { display: block; height: 100%; width: 0; background: var(--ph-grad); transition: width .25s linear; }
.ts-pomo[data-mode="short"] .ts-pomo-ring span, .ts-pomo[data-mode="long"] .ts-pomo-ring span { background: var(--ph-green); }
.ts-pomo-count { color: var(--ph-muted); font-size: .9rem; margin: 14px 0 0; min-height: 1.4em; }
.ts-pomo-settings h2 { font-size: 1rem; color: var(--ph-ink); margin: 0 0 12px; }
.ts-pomo-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ts-pomo-fields .field { margin: 0; }
.ts-pomo-fields label { font-size: .8rem; }
.ts-pomo-fields .input { font-size: 16px; text-align: center; padding-left: .4rem; padding-right: .4rem; }
.ts-check { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ph-text); font-size: .93rem; cursor: pointer; }
.ts-check input { width: 18px; height: 18px; accent-color: var(--ph-magenta); }
@media (min-width: 960px) { .ts-pomo { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }

/* ---------- Planner ---------- */
.ts-sumrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px; }
.ts-sumrow > div { padding: 14px 16px; border: 1px solid var(--ph-line); border-radius: 8px; background: var(--ph-surface); display: grid; gap: 2px; }
.ts-sumrow b { color: var(--ph-ink); font-size: 1.35rem; font-family: "Space Grotesk", var(--ph-font); }
.ts-sumrow span { color: var(--ph-muted); font-size: .84rem; }
.ts-weeknav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.ts-weeknav .tbtn { min-height: 44px; }
.ts-weeknav a:last-child { margin-left: auto; }
.ts-planform { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: end; }
.ts-planform .field { margin: 0; }
.ts-planform .input, .ts-planform .select { font-size: 16px; min-height: 46px; }
.ts-pf-btn { min-height: 46px; }
@media (min-width: 700px) { .ts-planform { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .ts-pf-title { grid-column: 1 / -1; } }
@media (min-width: 1100px) { .ts-planform { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) minmax(0, 2fr) minmax(0, 110px) auto; } .ts-pf-title { grid-column: auto; } }

.ts-week { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.ts-day { border: 1px solid var(--ph-line); border-radius: 8px; background: var(--ph-surface); padding: 12px 14px; }
.ts-day.is-today { border-color: rgba(225, 28, 242, .55); }
.ts-day header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.ts-day h3 { font-size: .98rem; color: var(--ph-ink); margin: 0; }
.ts-day h3 small { color: var(--ph-muted); font-weight: 500; margin-left: 4px; }
.ts-day header .ts-plan-min { margin-left: auto; }
.ts-day-empty { color: var(--ph-muted); font-size: .88rem; margin: 4px 0; }
.ts-plan-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--ph-line); }
.ts-day header + .ts-plan-row { border-top: 0; }
.ts-plan-row form { margin: 0; flex: none; }
.ts-plan-check { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; cursor: pointer; padding: 0; position: relative; color: #0A0118; }
.ts-plan-check::before { content: ""; position: absolute; width: 22px; height: 22px; border: 1.5px solid var(--ph-line2); border-radius: 6px; transition: background-color .15s, border-color .15s; }
.ts-plan-check .icon { width: 15px; height: 15px; position: relative; z-index: 1; stroke-width: 3; }
.ts-plan-check:hover::before { border-color: var(--ph-magenta); }
.ts-plan-row.is-done .ts-plan-check::before { background: var(--ph-green); border-color: var(--ph-green); }
.ts-plan-title { flex: 1; min-width: 0; color: var(--ph-text); font-size: .94rem; line-height: 1.45; overflow-wrap: anywhere; }
.ts-plan-title small { display: block; color: var(--ph-muted); font-size: .78rem; }
.ts-plan-row.is-done .ts-plan-title { color: var(--ph-muted); text-decoration: line-through; text-decoration-color: var(--ph-line2); }
.ts-plan-min { flex: none; color: var(--ph-muted); font-size: .8rem; white-space: nowrap; }
.ts-plan-del { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--ph-muted); cursor: pointer; border-radius: 6px; }
.ts-plan-del .icon { width: 17px; height: 17px; }
.ts-plan-del:hover { color: var(--ph-red); background: rgba(255, 77, 109, .08); }
@media (min-width: 900px) { .ts-week { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1400px) { .ts-week { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Guest sign-in prompt */
.ts-signin { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 22px; border: 1px solid var(--ph-line2); border-radius: 12px; background: var(--ph-surface); }
.ts-signin-preview { padding: 6px 12px; border: 1px solid var(--ph-line); border-radius: 8px; background: var(--ph-bg2); }
.ts-signin-preview .ts-plan-row:first-child { border-top: 0; }
.ts-signin-preview .ts-plan-check { width: 26px; height: 26px; }
.ts-plan-day { flex: none; width: 36px; color: var(--ph-muted); font-size: .8rem; font-weight: 600; }
.ts-signin-text h2 { color: var(--ph-ink); font-size: 1.25rem; margin: 0 0 8px; }
.ts-signin-text p { color: var(--ph-muted); line-height: 1.6; margin: 0; }
.ts-signin-text .ts-done-actions { justify-content: flex-start; }
@media (min-width: 760px) { .ts-signin { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; padding: 28px; } }

@media (prefers-reduced-motion: reduce) {
  .ts-face, .ts-bar-fill, .ts-pomo-ring span, .ts-tool-go { transition: none; }
}
