/* Toque or Beanie? — game styles (uses colours from /css/style.css) */

/* Make sure elements with the "hidden" attribute really stay hidden */
.cou [hidden] {
  display: none !important;
}

/* Keyboard hints only make sense on devices with a mouse/keyboard */
@media (hover: none) {
  .cou-key {
    display: none;
  }
}

.cou {
  max-width: 560px;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

.cou-head {
  text-align: center;
  margin-bottom: 1rem;
}

.cou-head h1 {
  margin: 0;
  font-size: clamp(1.8rem, 7vw, 2.4rem);
  line-height: 1.15;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cou-sub {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.cou-day {
  margin: 0.15rem 0 0;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
}

/* ---------- Start screen ---------- */

.cou-hero-icon {
  display: none;
  width: 148px;
  height: 148px;
  margin: 0.5rem auto 1rem;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.45));
}

.cou.is-start .cou-hero-icon {
  display: block;
  animation: cou-pop 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.25) both;
}

.cou.is-start .cou-head h1 {
  font-size: clamp(2.1rem, 9vw, 2.8rem);
}

@keyframes cou-pop {
  from { opacity: 0; transform: scale(0.6) rotate(-8deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}

@media (prefers-reduced-motion: reduce) {
  .cou.is-start .cou-hero-icon {
    animation: none;
  }
}

.cou-start {
  margin-top: 1.25rem;
  text-align: center;
}

.cou-start-btn {
  display: block;
  width: 100%;
  max-width: 420px;
  min-height: 64px;
  margin: 0 auto;
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--accent), #ffb347);
  color: #1a1030;
  font: inherit;
  font-size: 1.25rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(255, 204, 51, 0.25);
  touch-action: manipulation;
}

.cou-start-btn:hover,
.cou-start-btn:focus-visible {
  background: #fff;
}

.cou-start-btn:active {
  transform: scale(0.98);
}

.cou-start .cou-small {
  margin-top: 0.75rem;
}

.cou-testmode {
  margin: 0 0 1rem;
  padding: 0.5rem 0.8rem;
  border: 1px dashed var(--accent);
  border-radius: 10px;
  color: var(--accent);
  font-size: 0.85rem;
  text-align: center;
}

.cou-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.cou-muted {
  color: var(--muted);
}

.cou-small {
  font-size: 0.85rem;
}

/* ---------- Playing ---------- */

.cou-status {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.cou-dots {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
}

.cou-dots li {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
}

.cou-dots li.is-current {
  background: var(--muted);
}

.cou-dots li.is-right {
  background: #4ade80;
}

.cou-dots li.is-wrong {
  background: #ff6b6b;
}

.cou-place {
  text-align: center;
  padding: 1.75rem 0 1.5rem;
}

.cou-cat {
  display: inline-block;
  margin: 0 0 0.5rem;
  padding: 0.15rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 204, 51, 0.12);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.cou-prompt {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.cou-name.is-small {
  font-size: clamp(1.3rem, 6vw, 1.7rem);
}

.cou-clue {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.cou-name {
  margin: 0.4rem 0 0;
  font-size: clamp(1.8rem, 9vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.cou-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.cou-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 96px;
  padding: 0.75rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.08s ease, border-color 0.15s ease, background 0.15s ease;
}

.cou-choice-label {
  font-size: 1.35rem;
  font-weight: 800;
}

.cou-key {
  color: var(--muted);
  font-size: 0.75rem;
}

.cou-choice-ca {
  border-top: 5px solid var(--accent-2);
}

.cou-choice-us {
  border-top: 5px solid var(--accent);
}

/* Two-item questions: neutral buttons showing the item names */
.cou-choice.is-pair {
  border-top: 2px solid var(--border);
}

.cou-choice.is-pair .cou-choice-label {
  font-size: 1.1rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.cou-choice:hover:not(:disabled) {
  background: var(--border);
}

.cou-choice:active:not(:disabled) {
  transform: scale(0.97);
}

.cou-choice:disabled {
  cursor: default;
  opacity: 0.55;
}

.cou-choice.is-picked {
  opacity: 1;
  border-color: var(--text);
}

.cou-feedback:empty {
  display: none;
}

.cou-feedback {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: var(--bg-alt);
  border-left: 4px solid var(--border);
}

.cou-feedback.is-right {
  border-left-color: #4ade80;
}

.cou-feedback.is-wrong {
  border-left-color: #ff6b6b;
}

.cou-feedback p {
  margin: 0;
}

.cou-feedback .cou-verdict {
  font-weight: 800;
  font-size: 1.1rem;
}

.cou-feedback .cou-detail {
  margin-top: 0.2rem;
  color: #d3d4ea;
}

.cou-feedback .cou-source {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.cou-feedback .cou-source a {
  color: var(--muted);
}

.cou-next {
  display: block;
  width: 100%;
  margin-top: 0.85rem;
  min-height: 52px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #1a1030;
  font: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
}

.cou-next:hover,
.cou-next:focus-visible {
  background: #fff;
}

/* ---------- Finished ---------- */

#cou-end {
  text-align: center;
}

.cou-final-label {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.cou-final {
  margin: 0 0 1rem;
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.1;
  color: var(--accent);
}

.cou-share-label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.cou-share {
  display: block;
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  resize: none;
  text-align: center;
}

.cou-copy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1rem;
}

.cou-copy {
  min-width: 140px;
  min-height: 48px;
  border: 0;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.cou-copy-status {
  margin-top: 1rem;
  color: #4ade80;
  font-size: 0.9rem;
  font-weight: 600;
}

.cou-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 1.5rem 0 0.5rem;
}

.cou-stats div {
  padding: 0.6rem 0.25rem;
  border-radius: 10px;
  background: var(--bg-alt);
}

.cou-stats dt {
  color: var(--muted);
  font-size: 0.8rem;
}

.cou-stats dd {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
}

.cou-review-title {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.1rem;
}

.cou-review {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  text-align: left;
}

.cou-review li {
  display: flex;
  gap: 0.6rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.cou-review li:last-child {
  border-bottom: 0;
}

.cou-review .cou-review-name {
  font-weight: 700;
}

.cou-review .cou-review-info {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- About text & footer ---------- */

.cou-about {
  padding-bottom: 3rem;
}

.cou-attribution {
  margin: 1rem 0 0;
  font-size: 0.85rem;
}

.cou-attribution a {
  color: var(--muted);
}

@media (min-width: 721px) {
  .cou {
    padding-top: 2.5rem;
  }

  .cou-panel {
    padding: 1.75rem;
  }
}

/* ---------- Share (result screen) ---------- */

.cou-share-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  max-width: 420px;
  min-height: 60px;
  margin: 0 auto;
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #1a1030;
  font: inherit;
  font-size: 1.2rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(255, 92, 138, 0.25);
  touch-action: manipulation;
}

.cou-share-main:hover,
.cou-share-main:focus-visible {
  background: #fff;
}

.cou-share-main:active {
  transform: scale(0.98);
}

.cou-share-icon {
  width: 22px;
  height: 22px;
}

.cou-share-quick {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
}

.cou-share-quick a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 40px;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.cou-share-quick a:hover,
.cou-share-quick a:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.cou-share-quick svg {
  width: 16px;
  height: 16px;
}

.cou-share-preview-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 420px;
  margin: 1rem auto 0;
}

.cou-share-preview-row .cou-share-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.cou-share-preview-row .cou-share {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.6rem;
  font-size: 0.8rem;
  line-height: 1.4;
  text-align: left;
  color: var(--muted);
}

.cou-share-preview-row .cou-copy {
  flex: none;
  min-width: 0;
  min-height: 40px;
  padding: 0 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-alt);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.cou-share-preview-row .cou-copy:hover,
.cou-share-preview-row .cou-copy:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

p.cou-copy-status {
  min-height: 1.2em;
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
}

/* ---------- Load error ---------- */

#cou-error {
  text-align: center;
}

.cou-reload {
  margin-top: 1rem;
}

/* ---------- Share preview (v2: one tidy line, no clipped text) ---------- */

.cou-share-preview {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
  text-align: left;
  overflow-wrap: anywhere;
}

.cou-share-preview .cou-share-link-note {
  display: block;
  font-size: 0.75rem;
  opacity: 0.8;
}

.cou-share-hidden {
  position: fixed;
  top: 0;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

p.cou-copy-status.is-warn {
  color: var(--accent);
}
