/* Daily champion puzzle — layered on top of the shared style.css theme. */

.daily-page .daily-shell {
  width: min(1000px, calc(100% - 40px));
  padding-top: 30px;
  padding-bottom: 40px;
}

/* -------------------------------------------------------------------- hero */
.daily-hero { padding: 0 2px 22px; }
.daily-hero h1 {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.1;
  letter-spacing: -.035em;
  font-weight: 800;
}
.daily-number {
  background: linear-gradient(100deg, var(--accent), #ff9a55 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.daily-hero .lede { max-width: 720px; margin-top: 12px; }
.daily-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--dim);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.daily-meta strong { color: var(--text); font-weight: 600; }
.daily-sep { color: var(--line); }

/* ------------------------------------------------------------------ game */
.daily-game { position: relative; padding: 16px 16px 18px; overflow: visible; }

.daily-input-row { position: relative; display: flex; gap: 10px; align-items: stretch; }
#guessInput {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 14px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
#guessInput::placeholder { color: var(--dim); }
#guessInput:focus {
  outline: none;
  border-color: rgba(70, 167, 255, .6);
  box-shadow: 0 0 0 3px rgba(70, 167, 255, .12);
}
#guessBtn { min-width: 88px; min-height: 46px; border-radius: 12px; }
#guessBtn:disabled,
#guessInput:disabled { opacity: .55; cursor: not-allowed; }

.daily-suggestions {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: min(360px, 52vh);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0b111b;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}
.daily-suggestion {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font-size: 13px;
}
.daily-suggestion:hover,
.daily-suggestion.is-active {
  border-color: rgba(70, 167, 255, .4);
  background: var(--panel-2);
}
.daily-suggestion img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  object-fit: cover;
  background: var(--panel-3);
}
.daily-suggestion .suggestion-names { display: flex; flex-direction: column; line-height: 1.15; }
.daily-suggestion .suggestion-en { color: var(--dim); font-size: 11px; }
.daily-suggestion.is-taken { opacity: .45; }

.daily-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  margin: 14px 2px 12px;
}
.daily-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; color: var(--muted); font-size: 11px; }
.daily-legend span { display: inline-flex; align-items: center; gap: 6px; }
.daily-legend .dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.daily-legend .dot.exact { background: var(--green); }
.daily-legend .dot.partial { background: var(--gold); }
.daily-legend .dot.miss { background: #3a4b60; }
.daily-hint { margin: 0; color: var(--muted); font-size: 12px; }
.daily-hint.error { color: var(--red); }
.daily-hint.good { color: var(--green); }

/* ------------------------------------------------------------------ board */
.daily-board-wrap { overflow-x: auto; padding-bottom: 2px; }
.daily-board { display: grid; gap: 8px; min-width: 660px; }
.daily-row {
  display: grid;
  grid-template-columns: minmax(158px, 1.55fr) repeat(6, minmax(72px, 1fr));
  gap: 8px;
  align-items: stretch;
}
.daily-row.head .daily-cell {
  min-height: 0;
  padding: 0 4px 2px;
  border: 0;
  background: transparent;
  color: var(--dim);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.daily-cell {
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 58px;
  padding: 7px 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
}
.daily-cell.exact {
  border-color: rgba(72, 215, 160, .55);
  background: rgba(72, 215, 160, .15);
  color: #c9ffe9;
}
.daily-cell.partial {
  border-color: rgba(255, 191, 91, .55);
  background: rgba(255, 191, 91, .15);
  color: #ffe6b9;
}
.daily-cell.miss {
  border-color: var(--line-soft);
  background: rgba(139, 155, 178, .06);
  color: var(--muted);
}
.daily-cell .cell-main { font-weight: 600; }
.cell-lanes { display: inline-flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: wrap; }
.cell-lanes .role-glyph { width: 18px; height: 18px; }
.daily-cell.exact .role-glyph,
.daily-cell.partial .role-glyph { filter: brightness(0) invert(1); opacity: .95; }
.daily-cell .cell-sub { color: inherit; opacity: .72; font-size: 10px; }
.answer-lanes { display: inline-flex; align-items: center; gap: 4px; margin-right: 2px; }
.answer-lanes .role-glyph { width: 16px; height: 16px; }

.daily-champ {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  text-align: left;
}
.daily-champ img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  object-fit: cover;
  background: var(--panel-3);
  flex: 0 0 auto;
}
.daily-champ .champ-names { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.daily-champ .champ-zh { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.daily-champ .champ-en { color: var(--dim); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.daily-champ.is-solved { border-color: rgba(72, 215, 160, .55); box-shadow: 0 0 0 1px rgba(72, 215, 160, .2) inset; }

.arrow { margin-left: 4px; font-weight: 800; opacity: .9; }

/* ----------------------------------------------------------------- result */
.daily-result {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(72, 215, 160, .35);
  background: linear-gradient(120deg, rgba(72, 215, 160, .08), rgba(255, 61, 129, .05));
}
.daily-result.is-lost { border-color: rgba(255, 85, 112, .35); background: linear-gradient(120deg, rgba(255, 85, 112, .08), rgba(255, 191, 91, .05)); }
.daily-answer { display: flex; align-items: center; gap: 16px; }
.daily-answer img {
  width: 76px;
  height: 76px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--panel-3);
}
.daily-answer-copy h2 { margin: 2px 0 0; font-size: 22px; letter-spacing: -.02em; }
.daily-answer-copy h2 span { color: var(--dim); font-size: 13px; font-weight: 500; margin-left: 8px; letter-spacing: 0; }
.daily-answer-sub { margin: 4px 0 10px; color: var(--muted); font-size: 12px; }
.daily-share { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
.daily-share-status { color: var(--green); font-size: 12px; }
.daily-share-grid {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: rgba(7, 10, 16, .55);
  color: var(--text);
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: .12em;
  white-space: pre-wrap;
}
.daily-share-grid:empty { display: none; }

/* ------------------------------------------------------------------ howto */
.daily-howto { margin-top: 18px; padding-bottom: 16px; }
.daily-howto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 18px;
  padding: 14px 16px 0;
}
.daily-howto-grid article {
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(17, 27, 41, .5);
}
.daily-howto-grid p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.daily-howto-foot {
  margin: 14px 16px 0;
  color: var(--dim);
  font-size: 11px;
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}

/* ----------------------------------------------------------------- footer */
.daily-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 18px;
  width: min(1000px, calc(100% - 40px));
  margin: 12px auto 0;
  color: var(--dim);
  font-size: 11px;
}
.daily-foot .foot-legal { display: flex; gap: 14px; }
.daily-foot .foot-legal a:hover { color: var(--text); }

/* -------------------------------------------------------------- responsive */
@media (max-width: 760px) {
  .daily-page .daily-shell { width: calc(100% - 24px); padding-top: 20px; }
  .daily-board { min-width: 600px; }
  .daily-row { grid-template-columns: minmax(132px, 1.5fr) repeat(6, minmax(64px, 1fr)); }
  .daily-cell { min-height: 52px; font-size: 11px; }
  .daily-champ { min-height: 52px; padding: 5px 7px; }
  .daily-champ img { width: 32px; height: 32px; }
  .daily-answer h2 { font-size: 19px; }
  .daily-foot { width: calc(100% - 24px); }
}

@media (max-width: 560px) {
  .daily-hero h1 { font-size: 26px; }
  .daily-game { padding: 12px 10px 14px; }
  .daily-input-row { gap: 8px; }
  #guessBtn { min-width: 64px; }
  .daily-toolbar { align-items: flex-start; flex-direction: column; gap: 6px; }
  .daily-legend { gap: 10px; }
  .daily-board { min-width: 560px; }
  .daily-row { grid-template-columns: 120px repeat(6, 62px); gap: 6px; }
  .daily-cell { min-height: 48px; padding: 5px 4px; border-radius: 8px; }
  .daily-champ { padding: 4px 6px; border-radius: 8px; }
  .daily-champ .champ-en { display: none; }
  .daily-answer { gap: 12px; }
  .daily-answer img { width: 60px; height: 60px; }
  .daily-share { flex-direction: column; align-items: flex-start; }
  .daily-share .primary { width: 100%; }
}

/* ------------------------------------------------------- archive / recent */
.daily-archive-link {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 191, 91, .4);
}
.daily-archive-link:hover { color: var(--text); }
.daily-recent { margin-top: 20px; }
.daily-recent-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
}
.daily-recent-list a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(22, 34, 51, .4);
  color: var(--text);
  text-decoration: none;
}
.daily-recent-list a:hover {
  border-color: rgba(255, 61, 129, .55);
  background: rgba(255, 61, 129, .08);
}
.daily-recent-num { color: var(--gold); font-weight: 700; font-size: 12px; }
.daily-recent-date { color: var(--dim); font-size: 11px; }
.daily-recent-list strong { margin-left: auto; font-size: 13px; }
.daily-archive-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 4px;
}
.daily-archive-card .daily-answer { display: flex; gap: 18px; align-items: center; }
.daily-archive-card .daily-answer img {
  width: 96px;
  height: 96px;
  border-radius: 14px;
  border: 1px solid var(--line);
}
.daily-answer-en { color: var(--muted); font-size: 15px; font-weight: 500; }
.daily-attrs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}
.daily-attr {
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(17, 27, 41, .7);
}
.daily-attr span {
  display: block;
  color: var(--dim);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.daily-attr strong { display: block; margin-top: 4px; font-size: 14px; color: var(--text); }
.daily-attr .daily-role-cell { display: inline-flex; align-items: center; gap: 5px; }
.daily-attr .daily-role-cell .role-glyph { width: 20px; height: 20px; }
.daily-archive-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 0;
  flex-wrap: wrap;
}
.daily-archive-nav .primary { margin: 0 auto; }
.daily-archive-disabled { color: var(--dim); font-size: 12px; }
@media (max-width: 760px) {
  .daily-archive-card .daily-answer { align-items: flex-start; }
  .daily-archive-nav .primary { width: 100%; }
}
