:root {
  color-scheme: dark;
  --bg: #08111b;
  --panel: #0f1c2a;
  --panel2: #132436;
  --line: #26394d;
  --text: #f8fbff;
  --muted: #a8bacb;
  --mint: #80efd2;
  --blue: #8cc8ff;
  --warm: #ffd88a;
  --soft: #102033;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(circle at 50% -10%, #173b57, transparent 38rem), var(--bg);
  color: var(--text);
  font: 16px/1.5 Inter, system-ui, sans-serif;
}

a { color: var(--mint); }
button, input { font: inherit; }

:focus-visible {
  outline: 3px solid var(--warm);
  outline-offset: 3px;
}

main {
  width: min(960px, calc(100% - 1.25rem));
  margin: auto;
  padding: 0 0 max(2rem, env(safe-area-inset-bottom));
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 5;
  background: linear-gradient(var(--bg) 72%, transparent);
}

.brand { font-weight: 900; text-decoration: none; letter-spacing: .12em; }

.header-actions { display: flex; align-items: center; gap: .55rem; }

.operator-link {
  padding: .58rem .78rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  text-decoration: none;
  font-weight: 800;
}

.today-card {
  padding: 1.25rem 1.3rem;
  margin-bottom: 1rem;
  border: 1px solid #31506a;
  border-radius: 24px;
  background: linear-gradient(145deg, #142b40, #0f1c2a 62%, #0c1723);
  box-shadow: 0 22px 65px #0005;
}

.today-card h1 {
  margin: .65rem 0 .15rem;
  font-size: clamp(2.2rem, 8vw, 4rem);
  line-height: 1;
}

.today-detail { max-width: 48rem; margin: .6rem 0 0; color: #e4edf5; font-size: 1.02rem; }

.eyebrow { margin: 0; color: var(--mint); font-size: .7rem; font-weight: 900; letter-spacing: .16em; }

.panel {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 28, 42, .96);
  box-shadow: 0 18px 55px #0004;
}

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.section-heading h2, .panel h2 { margin: .1rem 0 .8rem; font-size: 1.3rem; }

.field-label { display: block; margin: .4rem 0 .3rem; color: var(--muted); font-size: .85rem; font-weight: 800; }

.name-row { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }

.name-row input, .redirect-row input {
  flex: 1 1 12rem;
  min-width: 0;
  padding: .68rem .8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0a1623;
  color: var(--text);
}

.suffix { color: var(--muted); font-weight: 800; }

.primary-button {
  padding: .68rem 1.1rem;
  border: 1px solid #31506a;
  border-radius: 999px;
  background: var(--panel2);
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
}

.primary-button:hover { border-color: var(--mint); }
.primary-button:disabled { opacity: .55; cursor: wait; }

.hint { color: var(--muted); font-size: .86rem; margin: .55rem 0 0; }

.result { min-height: 1.5em; margin: .8rem 0 0; font-weight: 700; }
.result[data-tone="good"] { color: var(--mint); }
.result[data-tone="warm"] { color: var(--warm); }
.result[data-tone="bad"] { color: #ff9d8a; }

.target-choice { border: 0; padding: 0; margin: 1rem 0; display: grid; gap: .6rem; }
.target-choice legend { font-weight: 800; margin-bottom: .5rem; padding: 0; }

.choice {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  padding: .8rem;
  border: 1px solid #22364a;
  border-radius: 16px;
  background: #0a1623;
  cursor: pointer;
}

.choice small { display: block; color: var(--muted); margin-top: .15rem; }
.choice input { margin-top: .3rem; }

.redirect-row { margin-top: .2rem; }

.stack { display: grid; gap: .65rem; }
.stack article { padding: .9rem; border: 1px solid #22364a; border-radius: 16px; background: #0a1623; }
.stack p { margin: .4rem 0 0; color: #e6eef5; }

.card-top { display: flex; align-items: start; justify-content: space-between; gap: .7rem; }
.card-top strong { display: block; }

.category {
  flex: 0 0 auto;
  padding: .18rem .42rem;
  border: 1px solid #31506a;
  border-radius: 999px;
  color: var(--blue);
  font-size: .66rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.when { display: block; color: var(--muted); font-size: .84rem; margin-top: .15rem; }

.release-button {
  margin-top: .7rem;
  padding: .45rem .8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.release-button:hover { color: #ff9d8a; border-color: #ff9d8a; }

.principles p:last-child { margin: .25rem 0 0; font-size: 1.02rem; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  color: var(--muted);
  font-size: .85rem;
}

footer > div { display: grid; gap: .2rem; }
footer small { display: block; max-width: 54rem; color: #7f93a7; font-size: .74rem; }
footer a { font-weight: 800; text-decoration: none; }

@media (max-width: 760px) {
  main { width: 100%; padding-inline: max(.7rem, env(safe-area-inset-left)) max(.7rem, env(safe-area-inset-right)); }
  .today-card { padding: 1rem; }
  .today-card h1 { font-size: clamp(2rem, 12vw, 3.2rem); }
  footer { align-items: flex-start; flex-direction: column; }
}
