/*
 * [INPUT]: MagicPath 设计 token 与 fp-shell.css 外壳变量（--paper、--ink、--forest、--coral、--lime）。
 * [OUTPUT]: /tango/ 游戏页与 /tango-solver/ 求解器共用棋盘网格、日月 SVG 图标尺寸、边线索 (= / ×) 跨格徽章与可点击线索纽扣、动作栏、胜利卡片与指南样式。
 * [POS]: src/tango 样式表（构建后服务 /tango/ 与 /tango-solver/），严格零内联 style 属性依赖（适配 style-src 'self' CSP）。
 * [PROTOCOL]: 变更时更新此头部，然后检查 CLAUDE.md
 */
.t-workbench { display: grid; gap: 20px; padding: 22px 0 10px; align-items: start; }
@media (min-width: 860px) {
  .t-workbench { grid-template-columns: minmax(0, 1.15fr) minmax(310px, .85fr); gap: 24px; }
}

.t-card { background: var(--surface); border: 1px solid #D8DED6; border-radius: 15px; padding: 18px; box-shadow: 0 3px 0 #E6E9E2; }
.t-hud { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid #E5EBE3; }
.t-hud-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.t-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: #EFF3ED; color: var(--ink); font-size: 12px; font-weight: 760; }
.t-badge.daily { background: #E2EEE4; color: #1E544B; }
.t-badge.streak { background: #FCEFE9; color: #9C3E26; }
.t-stats { display: flex; align-items: center; gap: 14px; font-size: 13px; font-weight: 740; font-variant-numeric: tabular-nums; color: #4A5B55; }

.t-board-wrap { display: flex; justify-content: center; }
.t-board-frame {
  width: min(100%, 440px);
  padding: 5px;
  background: #FFFDF8;
  border: 3px solid #7A623B;
  border-radius: 10px;
  box-shadow: 4px 6px 0 rgba(122, 98, 59, .16);
}
.t-grid {
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  background: #FFFDF8;
  touch-action: manipulation;
  user-select: none;
}
.t-grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: repeat(6, minmax(0, 1fr)); }
.t-grid-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); grid-template-rows: repeat(8, minmax(0, 1fr)); }

.t-cell {
  position: relative;
  min-width: 0;
  min-height: 0;
  border: 1px solid #DFD3BA;
  background: #FFFFFF;
  padding: 0;
  display: grid;
  place-items: center;
  overflow: visible;
  transition: background-color .08s ease;
}
.t-cell:not(.is-given):hover { background: #FAF7EE; }
.t-cell.is-given { background: #F4ECDA; cursor: default; }
.t-cell.is-solved { background: #EEF6F1; }
.t-cell:focus-visible { outline: 3px solid #D8784B; outline-offset: -3px; }
.t-cell.conflict { box-shadow: inset 0 0 0 3px #EE6B4B; background-color: #FDECE7; }
.t-cell.is-given.conflict { background-color: #F9DDD4; }
.t-cell.hinted { box-shadow: inset 0 0 0 3px #225E55; }
.t-cell-wrap { position: relative; min-width: 0; min-height: 0; display: grid; }
.t-cell-wrap > .t-cell { width: 100%; height: 100%; }
.t-cell-wrap > .t-cell.is-given { cursor: pointer; }

.t-icon-slot { width: 100%; height: 100%; display: grid; place-items: center; pointer-events: none; }
.t-icon { width: 56%; height: 56%; display: block; pointer-events: none; }
.t-sun { color: #E59B28; }
.t-moon { color: #4D678A; }

.t-clue {
  position: absolute;
  z-index: 4;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FFFDF7;
  border: 1.5px solid #9A8460;
  color: #544225;
  display: grid;
  place-items: center;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  pointer-events: none;
  box-shadow: 0 1px 2px rgba(24, 43, 44, .12);
}
.t-clue-r { right: -1px; top: 50%; transform: translate(50%, -50%); }
.t-clue-b { bottom: -1px; left: 50%; transform: translate(-50%, 50%); }
.t-clue.violated { background: #EE6B4B; border-color: #B43018; color: #FFFDF7; }
.t-clue-btn { pointer-events: auto; cursor: pointer; padding: 0; transition: background-color .1s ease, border-color .1s ease; }
.t-clue-btn::after { content: ''; position: absolute; inset: -4px; }
.t-clue-btn.is-empty { background: rgba(255, 253, 247, .72); border: 1.5px dashed #C7B99D; color: transparent; box-shadow: none; }
.t-clue-btn.is-empty:hover, .t-clue-btn.is-empty:focus-visible { background: #FFFDF7; border-style: solid; border-color: var(--forest); }
.t-grid-8 .t-clue { width: 19px; height: 19px; font-size: 11px; }

.t-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.t-actions-solver { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.t-btn-compact { min-height: 34px; padding: 5px 11px; font-size: 12px; }
.t-btn-span2 { grid-column: span 2; }
.t-btn {
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #CDD8CF;
  background: #F4F7F2;
  color: var(--ink);
  font-size: 13px;
  font-weight: 720;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.t-btn:hover:not(:disabled) { border-color: #93B5A5; background: #EAEFE8; }
.t-btn:disabled { opacity: .45; cursor: not-allowed; }
.t-btn.primary { background: var(--forest); border-color: var(--forest); color: #FFFDF7; }
.t-btn.primary:hover:not(:disabled) { background: #1B4E46; }
.t-btn.coral { background: var(--coral); border-color: var(--coral); color: #FFFDF7; }
.t-btn.coral:hover:not(:disabled) { background: #DA5A3C; }
.t-btn-full { width: 100%; margin-top: 10px; }

.t-panel { display: flex; flex-direction: column; gap: 14px; }
.t-panel-title { font-size: 15px; font-weight: 820; margin: 0 0 10px; letter-spacing: -.3px; }
.t-seg { display: flex; background: #EAEFE9; border: 1px solid #D6DFD7; border-radius: 10px; padding: 3px; gap: 3px; }
.t-seg button { flex: 1; min-height: 38px; border: 0; border-radius: 7px; background: transparent; color: #5B6C65; font-size: 13px; font-weight: 760; }
.t-seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(24, 43, 44, .12); }

.t-sizes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.t-sizes button { min-height: 38px; border-radius: 8px; border: 1px solid #D4DDD5; background: var(--paper); color: var(--ink); font-size: 13px; font-weight: 750; padding: 4px; }
.t-sizes button.on { background: var(--forest); border-color: var(--forest); color: #FFFDF7; }

.t-status { padding: 12px 14px; border-radius: 10px; background: #F1F4EE; border: 1px solid #DCE3DB; font-size: 13px; line-height: 1.45; color: #3D504A; }
.t-status.ok { background: #E3F0E7; border-color: #B6D7C2; color: #1A4E43; }
.t-status.warn { background: #FDF3DF; border-color: #E7CE98; color: #6E4E1B; }
.t-status.err { background: #FDEAE5; border-color: #F0B6A8; color: #8F2C18; }
.t-legend-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13px; line-height: 1.45; color: #4A5A54; }

.t-victory { background: #E8F2B5; border: 1px solid #C5D67D; border-radius: 15px; padding: 18px; color: var(--ink); }
.t-victory h3 { font-size: 20px; font-weight: 850; letter-spacing: -.5px; margin: 0 0 6px; }
.t-victory p { margin: 0 0 12px; font-size: 13px; color: #334942; }
.t-victory-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.t-callout { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: #EDF1E9; border: 1px solid #D5DED5; border-radius: 12px; font-size: 13px; }
.t-callout strong { display: block; font-size: 14px; margin-bottom: 2px; }
.t-callout span { color: var(--muted); font-size: 12px; }
.t-callout a { flex: none; padding: 8px 13px; border-radius: 999px; background: var(--surface); border: 1px solid #C8D4CA; color: var(--forest); font-weight: 760; font-size: 12px; text-decoration: none; white-space: nowrap; }
.t-callout a:hover { border-color: var(--forest); }

.t-guide { margin-top: 28px; display: grid; gap: 18px; }
.t-guide-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; font-weight: 670; }
.t-guide-nav a { color: var(--forest); text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: 36px; }
.t-guide section { background: var(--surface); border: 1px solid #D8DED6; border-radius: 15px; padding: 22px 24px; }
.t-guide h2 { font-size: 20px; letter-spacing: -.6px; margin: 0 0 12px; }
.t-guide p, .t-guide li { font-size: 14px; line-height: 1.65; color: #4A5A54; }
.t-guide ol, .t-guide ul { margin: 8px 0; padding-left: 20px; }
.t-guide details { border-top: 1px solid #E3E9E2; padding: 6px 0; }
.t-guide summary { min-height: 44px; display: flex; align-items: center; font-weight: 750; font-size: 14px; cursor: pointer; color: var(--ink); }
.t-guide details p { margin: 4px 0 12px; }

@media (max-width: 620px) {
  .t-workbench { gap: 12px; padding: 12px 0 6px; }
  .t-card { padding: 12px; border-radius: 12px; }
  .t-hud { margin-bottom: 10px; padding-bottom: 8px; }
  .t-actions { margin-top: 10px; gap: 6px; }
  .t-actions-solver { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 10px; gap: 6px; }
  .t-btn { font-size: 12px; padding: 6px; }
  .t-clue { width: 18px; height: 18px; font-size: 11px; }
  .t-grid-8 .t-clue { width: 16px; height: 16px; font-size: 10px; }
  .t-guide section { padding: 16px; }
}
[hidden] { display: none !important; }
