/* DailyPick web tools — accent matches app Color(0xFF5C6BC0) */
:root {
  --bg: #f4f6fb;
  --bg-accent: #e8ecf8;
  --ink: #1a1d2e;
  --muted: #5a6178;
  --line: #d5dae8;
  --card: #ffffff;
  --accent: #5c6bc0;
  --accent-deep: #3f4aa8;
  --ok: #2e7d32;
  --warn: #c62828;
  --radius: 14px;
  --shadow: 0 1px 0 rgba(26, 29, 46, 0.04), 0 12px 32px rgba(63, 74, 168, 0.08);
  --font: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #dfe5f8 0%, transparent 55%),
    radial-gradient(900px 420px at 100% 0%, #e9e4f6 0%, transparent 50%),
    var(--bg);
  line-height: 1.55;
}

a {
  color: var(--accent-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
}

.wrap {
  width: min(720px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 3.5rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-bottom: 1.75rem;
  font-size: 0.92rem;
}

.site-nav .brand {
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-nav .brand span {
  color: var(--accent);
}

.site-nav .crumb {
  color: var(--muted);
}

h1 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.65rem, 4vw, 2.15rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.lead {
  margin: 0 0 1.4rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.15rem 1.2rem 1.3rem;
}

.panel + .panel {
  margin-top: 1rem;
}

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

.field {
  margin-bottom: 0.9rem;
}

input[type="text"],
input[type="number"],
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font: inherit;
  color: var(--ink);
  background: #fafbfe;
}

input:focus,
textarea:focus,
button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, white);
  outline-offset: 2px;
}

textarea {
  min-height: 7.5rem;
  resize: vertical;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
}

.row > .field {
  flex: 1 1 8rem;
  margin-bottom: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

button,
.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.72rem 1.15rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

button.primary,
.btn.primary {
  background: var(--accent);
  color: #fff;
}

button.primary:hover,
.btn.primary:hover {
  background: var(--accent-deep);
}

button.ghost,
.btn.ghost {
  background: var(--bg-accent);
  color: var(--accent-deep);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.result {
  margin-top: 1.1rem;
  padding: 1rem;
  border-radius: 12px;
  background: linear-gradient(180deg, #f7f8fd, #eef1fa);
  border: 1px dashed var(--line);
  min-height: 3rem;
}

.result strong {
  display: block;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  height: 2.4rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.75rem;
  margin: 1.2rem 0 2rem;
}

.tool-card {
  display: block;
  padding: 1rem 0.95rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.tool-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.tool-card h2 {
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.cta {
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  background: #1a1d2e;
  color: #eef0f8;
}

.cta p {
  margin: 0 0 0.75rem;
  color: #c5cadb;
  font-size: 0.95rem;
}

.cta .btn.primary {
  background: #fff;
  color: #1a1d2e;
}

.cta .btn.primary:hover {
  background: #e8ecf8;
}

.note {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.ad-slot {
  min-height: 0;
  margin: 1rem 0;
}

.ad-slot[data-ready="1"] {
  min-height: 90px;
}

.timer-display {
  font-size: clamp(2.8rem, 12vw, 4.5rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  text-align: center;
  line-height: 1;
  padding: 0.6rem 0 0.2rem;
}

.timer-meta {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}

.ladder-board {
  overflow-x: auto;
  padding: 0.5rem 0;
}

.ladder-board canvas {
  display: block;
  margin: 0 auto;
  max-width: 100%;
}

.roulette-wheel {
  width: min(280px, 80vw);
  height: min(280px, 80vw);
  margin: 0.4rem auto 0.8rem;
  border-radius: 50%;
  border: 6px solid var(--ink);
  position: relative;
  transition: transform 4s cubic-bezier(0.12, 0.75, 0.12, 1);
  background: conic-gradient(
    #5c6bc0 0 60deg,
    #7e57c2 60deg 120deg,
    #42a5f5 120deg 180deg,
    #26a69a 180deg 240deg,
    #ffca28 240deg 300deg,
    #ef5350 300deg 360deg
  );
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.15);
}

.roulette-pointer {
  width: 0;
  height: 0;
  margin: 0 auto;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 16px solid var(--ink);
}

.pair-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.pair-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.7rem;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.pair-list .from {
  font-weight: 700;
}

.pair-list .to {
  color: var(--accent-deep);
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .tool-card,
  .roulette-wheel {
    transition: none;
  }
}
