/* color-test/color.css — color test ("find the different color"): dark stage, board, result, article.
   Used by /color-test/ and /ko/color-test/. Loaded after /css/easytest.css and /css/clean-test.css;
   everything is scoped to body.color-test-page and .ct-* classes.
   The stage follows the Short it recreates: dark board, rounded tiles with a soft top highlight,
   LEVEL n + difficulty pill, time bar, level dots, the odd tile outlined on reveal. */

body.test-page.color-test-page {
  --ct-bg: #100F16;
  --ct-bg-center: #221F2E;
  --ct-fg: #F6F4F0;
  --ct-dim: #B4B0BE;
  --ct-accent: #FFD65C;
  --ct-good: #60E296;
  --ct-bad: #FF5C5C;
  --ct-orange: #FF963C;
  --ct-beyond: #C3A6FF;
  --ct-track: #34323E;
  --ct-todo: #423E4E;
  --ct-ink: #1F1733;
  --ct-mute: #6B6480;
  --ct-purple: #8257E6;
  --ct-purple-dark: #6C3FD4;
  overflow-wrap: break-word;
}
body.test-page.color-test-page:lang(ko) {
  font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  word-break: keep-all;
}

.color-test-page .ct-sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.color-test-page .hidden { display: none !important; }

/* ---- Shell ---- */
.color-test-page .ct-shell { width: 100%; max-width: 760px; margin: 0 auto; padding: 16px 16px 24px; }
.color-test-page .ct-topnav { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.color-test-page .ct-lang { color: var(--ct-mute); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.color-test-page .ct-lang:hover { color: var(--ct-purple); }

body.test-page.color-test-page .ct-head { text-align: center; margin-bottom: 18px; }
body.test-page.color-test-page .ct-head h1 {
  font-size: clamp(1.7rem, 6vw, 2.4rem) !important; font-weight: 800 !important;
  letter-spacing: -0.03em; margin: 4px 0 8px !important; line-height: 1.2;
}
body.test-page.color-test-page .ct-head p { font-size: 15px !important; margin: 0; line-height: 1.6; }

/* ---- Stage ---- */
.color-test-page .ct-stage {
  background: radial-gradient(120% 90% at 50% 34%, var(--ct-bg-center) 0%, var(--ct-bg) 72%);
  color: var(--ct-fg); border-radius: 22px; padding: 22px 18px 24px;
  box-shadow: 0 18px 40px rgba(31, 23, 51, 0.22);
  scroll-margin-top: 12px;
}
.color-test-page .ct-panel { text-align: center; }
body.test-page.color-test-page .ct-stage h2,
body.test-page.color-test-page .ct-stage h3 { color: var(--ct-fg); }

.color-test-page .ct-pill {
  display: inline-block; border-radius: 999px; padding: 5px 14px 4px; font-weight: 800; font-size: 13px;
  letter-spacing: 0.06em; line-height: 1.3; color: #18161C; background: var(--ct-accent);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.55);
}
.color-test-page .ct-pill, .color-test-page .ct-level { font-family: 'Plus Jakarta Sans', 'Noto Sans KR', system-ui, -apple-system, 'Segoe UI', sans-serif; }
.color-test-page .ct-pill[data-tag="EASY"] { background: var(--ct-good); }
.color-test-page .ct-pill[data-tag="MEDIUM"] { background: var(--ct-accent); }
.color-test-page .ct-pill[data-tag="HARD"] { background: var(--ct-orange); }
.color-test-page .ct-pill[data-tag="INSANE"] { background: var(--ct-bad); }
.color-test-page .ct-pill[data-tag="BEYOND"] { background: var(--ct-beyond); }

body.test-page.color-test-page .ct-title {
  font-size: clamp(1.6rem, 7vw, 2.3rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15;
  margin: 14px 0 6px; color: var(--ct-fg);
}
.color-test-page .ct-sub { color: var(--ct-dim); font-size: 14px; line-height: 1.55; margin: 0 auto; max-width: 34em; }
.color-test-page .ct-sub + .ct-sub { margin-top: 6px; }
.color-test-page .ct-best { color: var(--ct-accent); font-size: 14px; font-weight: 700; margin: 10px 0 0; min-height: 1.4em; }

/* Small sample board on the start panel (decoration only). */
.color-test-page .ct-demo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; width: 132px; margin: 18px auto 16px; }
.color-test-page .ct-demo span { aspect-ratio: 1 / 1; border-radius: 16%; position: relative; box-shadow: 0 3px 0 #06060A; }
.color-test-page .ct-demo span::before,
.color-test-page .ct-tile::before {
  content: ""; position: absolute; left: 4%; right: 4%; top: 4%; height: 14%;
  border-radius: 999px; background: rgba(255, 255, 255, 0.07); pointer-events: none;
}

/* ---- Buttons ---- */
.color-test-page .ct-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
.color-test-page .ct-btn {
  appearance: none; border-radius: 14px; padding: 12px 22px; min-height: 46px; font-weight: 800; font-size: 16px;
  cursor: pointer; border: 1.5px solid transparent; line-height: 1.2; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; transition: none;
}
.color-test-page .ct-btn-primary { background: var(--ct-accent); color: #18161C; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.55); }
.color-test-page .ct-btn-primary:hover { background: #FFE08A; }
.color-test-page .ct-btn-ghost { background: transparent; color: var(--ct-fg); border-color: rgba(246, 244, 240, 0.32); }
.color-test-page .ct-btn-ghost:hover { border-color: rgba(246, 244, 240, 0.7); }
.color-test-page .ct-btn-small { min-height: 38px; padding: 8px 16px; font-size: 14px; font-weight: 700; }
.color-test-page .ct-stage .ct-btn:focus-visible,
.color-test-page .ct-stage a:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 3px; border-radius: 14px; }

.color-test-page .ct-links { margin: 16px 0 0; font-size: 14px; color: var(--ct-dim); }
.color-test-page .ct-links a { color: var(--ct-fg); text-decoration: underline; text-underline-offset: 3px; }
.color-test-page .ct-links a:hover { color: var(--ct-accent); }

/* ---- HUD ---- */
.color-test-page .ct-hud-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 24px; }
.color-test-page .ct-hearts { display: inline-flex; gap: 5px; }
.color-test-page .ct-heart { width: 22px; height: 22px; fill: var(--ct-bad); }
.color-test-page .ct-heart.is-lost { fill: var(--ct-todo); }
.color-test-page .ct-hud-best { color: var(--ct-dim); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.color-test-page .ct-level {
  font-size: clamp(2rem, 9vw, 2.9rem); font-weight: 800; letter-spacing: 0.01em; line-height: 1.05;
  margin: 2px 0 8px; color: var(--ct-fg); font-variant-numeric: tabular-nums;
}

/* ---- Board ---- */
.color-test-page .ct-board {
  --n: 2; --gap: 10px;
  display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: var(--gap);
  width: min(100%, 440px); aspect-ratio: 1 / 1; margin: 16px auto 0;
  touch-action: manipulation; -webkit-user-select: none; user-select: none;
}
.color-test-page .ct-board[data-dense="1"] { --gap: 6px; }
.color-test-page .ct-tile {
  appearance: none; -webkit-appearance: none; display: block; position: relative; width: 100%; min-width: 0;
  /* easytest.css gives every button on a test page a 44px minimum height and a background transition. */
  min-height: 0; transition: none;
  aspect-ratio: 1 / 1; margin: 0; padding: 0; border: 0; border-radius: 16%; cursor: pointer;
  box-shadow: 0 3px 0 #06060A; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.color-test-page .ct-tile:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 2px; border-radius: 16%; z-index: 2; }
.color-test-page .ct-board.is-reveal .ct-tile { cursor: default; }
.color-test-page .ct-board.is-reveal .ct-tile:not(.is-odd) { opacity: 0.4; }
.color-test-page .ct-tile.is-odd { z-index: 1; box-shadow: 0 0 0 3px var(--ct-bg), 0 0 0 7px var(--ct-accent); }
.color-test-page .ct-board.is-reveal .ct-tile.is-wrong { opacity: 0.75; box-shadow: 0 0 0 3px var(--ct-bg), 0 0 0 6px var(--ct-bad); }

/* ---- Time bar and level dots ---- */
.color-test-page .ct-time { display: flex; align-items: center; gap: 10px; width: min(100%, 440px); margin: 18px auto 0; }
.color-test-page .ct-time-track { flex: 1; height: 8px; border-radius: 999px; background: var(--ct-track); overflow: hidden; }
.color-test-page .ct-time-fill { height: 100%; width: 100%; border-radius: 999px; background: var(--ct-accent); transform-origin: left center; }
.color-test-page .ct-time.is-low .ct-time-fill { background: var(--ct-bad); }
.color-test-page .ct-time-left { min-width: 2.6em; text-align: right; font-size: 13px; font-weight: 700; color: var(--ct-dim); font-variant-numeric: tabular-nums; }

.color-test-page .ct-dots { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 14px 0 0; min-height: 16px; }
.color-test-page .ct-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ct-todo); }
.color-test-page .ct-dot[data-state="done"] { background: var(--ct-accent); }
.color-test-page .ct-dot[data-state="current"] { background: var(--ct-accent); width: 14px; height: 14px; }
.color-test-page .ct-dots-extra { color: var(--ct-accent); font-size: 13px; font-weight: 800; margin-left: 2px; font-variant-numeric: tabular-nums; }

.color-test-page .ct-status { min-height: 1.5em; margin: 12px 0 0; font-size: 14px; font-weight: 700; color: var(--ct-fg); }
.color-test-page .ct-status[data-tone="good"] { color: var(--ct-good); }
.color-test-page .ct-status[data-tone="bad"] { color: #FF8A8A; }

/* ---- Result ---- */
.color-test-page .ct-kicker { font-size: 13px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ct-dim); margin: 0 0 4px; }
body.test-page.color-test-page h2.ct-kicker { color: var(--ct-dim); }
.color-test-page .ct-compare { font-size: 16px; line-height: 1.5; margin: 14px auto 0; max-width: 30em; color: var(--ct-fg); }
.color-test-page .ct-toast { min-height: 1.4em; margin: 10px 0 0; font-size: 13px; color: var(--ct-dim); }
.color-test-page .ct-fine { font-size: 13px; line-height: 1.55; color: var(--ct-dim); margin: 14px auto 0; max-width: 36em; }

/* ---- Note under the stage ---- */
.color-test-page .ct-note {
  background: #FFF1EF; border: 1px solid #FFD3CD; border-radius: 14px; padding: 12px 16px; margin: 16px 0 0;
  color: #3D3550; font-size: 14px; line-height: 1.6;
}
.color-test-page .ct-note strong { color: var(--ct-ink); }

/* ---- Article ---- */
.color-test-page .ct-article { margin-top: 32px; }
.color-test-page .ct-article h2 { font-size: 1.4rem; font-weight: 800; margin: 2rem 0 0.75rem; line-height: 1.3; }
.color-test-page .ct-article h3 { font-size: 1.08rem; font-weight: 800; margin: 1.25rem 0 0.4rem; }
.color-test-page .ct-article p, .color-test-page .ct-article li { color: #3D3550; line-height: 1.7; }
.color-test-page .ct-article p { margin: 0 0 0.85rem; }
.color-test-page .ct-article ul, .color-test-page .ct-article ol { padding-left: 1.25rem; margin: 0 0 1rem; }
.color-test-page .ct-article ul { list-style: disc; }
.color-test-page .ct-article ol { list-style: decimal; }
.color-test-page .ct-article li { margin-bottom: 0.4rem; }
.color-test-page .ct-article a { color: var(--ct-purple-dark); text-decoration: underline; overflow-wrap: anywhere; }
.color-test-page .ct-table-wrap { overflow-x: auto; margin: 0.5rem 0 1rem; }
.color-test-page .ct-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.color-test-page .ct-table th, .color-test-page .ct-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #EEE8FA; vertical-align: top; color: #3D3550; }
.color-test-page .ct-table th { color: var(--ct-ink); font-weight: 800; }
.color-test-page .ct-table td:nth-child(1), .color-test-page .ct-table td:nth-child(2) { white-space: nowrap; }
.color-test-page .ct-faq { margin: 0; }
.color-test-page .ct-faq dt { font-weight: 800; color: var(--ct-ink); margin-top: 1rem; }
.color-test-page .ct-faq dd { margin: 0.25rem 0 0; color: #3D3550; line-height: 1.7; }
.color-test-page .ct-sources li { overflow-wrap: anywhere; font-size: 0.92rem; }
.color-test-page .ct-more { font-size: 0.92rem; color: var(--ct-mute); margin-top: 1.25rem; }

body.test-page.color-test-page .easy-ad-slot { margin: 24px auto; }

/* ---- Footer ---- */
body.test-page.color-test-page footer { text-align: center; margin-top: 40px !important; padding: 24px 16px !important; }
.color-test-page footer .site-legal { margin-bottom: 6px; }
.color-test-page footer .site-legal a { color: var(--ct-mute); text-decoration: none; }
.color-test-page footer .site-legal a:hover { color: var(--ct-purple); text-decoration: underline; }

@media (max-width: 420px) {
  .color-test-page .ct-stage { padding: 18px 12px 20px; border-radius: 18px; }
  .color-test-page .ct-board { --gap: 8px; }
  .color-test-page .ct-board[data-dense="1"] { --gap: 4px; }
  .color-test-page .ct-dots { gap: 7px; }
}

/* ---- Motion (only when the visitor has not asked for less) ---- */
@media (prefers-reduced-motion: no-preference) {
  .color-test-page .ct-board.is-pop { animation: ct-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
  .color-test-page .ct-level.is-pop { animation: ct-level 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
  .color-test-page .ct-tile { transition: opacity 0.18s ease, transform 0.08s ease; }
  .color-test-page .ct-tile:active { transform: scale(0.96); }
  .color-test-page .ct-tile.is-odd { animation: ct-ring 0.32s ease-out; }
  .color-test-page .ct-board.is-miss { animation: ct-shake 0.3s ease-in-out; }
  .color-test-page .ct-btn { transition: background-color 0.15s ease, border-color 0.15s ease; }
}
@keyframes ct-pop { from { transform: scale(0.9); opacity: 0.6; } to { transform: scale(1); opacity: 1; } }
@keyframes ct-level { from { transform: scale(0.8); } to { transform: scale(1); } }
@keyframes ct-ring {
  from { box-shadow: 0 0 0 8px var(--ct-bg), 0 0 0 10px var(--ct-accent); }
  to { box-shadow: 0 0 0 3px var(--ct-bg), 0 0 0 7px var(--ct-accent); }
}
@keyframes ct-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
