@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css");

:root {
  color-scheme: light;
  --ink: #17201d;
  --muted: #66716d;
  --quiet: #89928e;
  --line: rgba(23, 32, 29, 0.1);
  --chrome-line: rgba(255, 255, 255, 0.78);
  --control-line: rgba(23, 32, 29, 0.1);
  --control-bg: rgba(255, 255, 255, 0.7);
  --control-bg-hover: rgba(255, 255, 255, 0.88);
  --control-ink: #26332f;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-solid: #fffdf8;
  --surface-soft: #f5f0e8;
  --panel: rgba(255, 253, 248, 0.82);
  --topbar-bg: rgba(255, 253, 248, 0.72);
  --ad-bg: linear-gradient(135deg, rgba(255, 253, 248, 0.58), rgba(255, 255, 255, 0.26)),
    repeating-linear-gradient(45deg, transparent 0 16px, rgba(23, 32, 29, 0.025) 16px 32px);
  --press-bg: radial-gradient(circle at 50% 44%, rgba(232, 88, 79, 0.08), transparent 18rem),
    linear-gradient(180deg, rgba(255, 253, 248, 0.92), rgba(246, 240, 232, 0.9));
  --body-bg: radial-gradient(circle at 9% 7%, rgba(231, 116, 76, 0.13), transparent 25rem),
    radial-gradient(circle at 86% 2%, rgba(20, 143, 126, 0.12), transparent 28rem),
    linear-gradient(135deg, #fbf7ef 0%, #eef6f3 47%, #f8f0e9 100%);
  --grid-line: rgba(23, 32, 29, 0.025);
  --rank-number-bg: #ece8df;
  --rank-highlight-bg: rgba(226, 249, 242, 0.72);
  --cue-bg: rgba(255, 253, 248, 0.94);
  --cue-ink: #17201d;
  --focus: #0f8f7e;
  --button-top: #e8584f;
  --button-side: #9f312e;
  --button-shadow: #5e1c1b;
  --shadow-soft: 0 18px 46px rgba(46, 37, 29, 0.1);
  --shadow-lift: 0 18px 34px rgba(46, 37, 29, 0.14);
}

body[data-theme="dark"] {
  color-scheme: dark;
  --ink: #eef7f3;
  --muted: #afbeb8;
  --quiet: #879892;
  --line: rgba(238, 247, 243, 0.12);
  --chrome-line: rgba(238, 247, 243, 0.1);
  --control-line: rgba(238, 247, 243, 0.14);
  --control-bg: rgba(19, 30, 27, 0.78);
  --control-bg-hover: rgba(28, 43, 39, 0.92);
  --control-ink: #eef7f3;
  --surface: rgba(19, 30, 27, 0.84);
  --surface-solid: #121b19;
  --surface-soft: #17231f;
  --panel: rgba(18, 27, 25, 0.86);
  --topbar-bg: rgba(18, 27, 25, 0.78);
  --ad-bg: linear-gradient(135deg, rgba(24, 37, 33, 0.74), rgba(16, 24, 22, 0.48)),
    repeating-linear-gradient(45deg, transparent 0 16px, rgba(238, 247, 243, 0.035) 16px 32px);
  --press-bg: radial-gradient(circle at 50% 44%, rgba(232, 88, 79, 0.12), transparent 18rem),
    linear-gradient(180deg, rgba(18, 27, 25, 0.94), rgba(12, 18, 17, 0.92));
  --body-bg: radial-gradient(circle at 9% 7%, rgba(232, 88, 79, 0.16), transparent 25rem),
    radial-gradient(circle at 86% 2%, rgba(20, 143, 126, 0.18), transparent 28rem),
    linear-gradient(135deg, #0e1514 0%, #162522 49%, #0d1211 100%);
  --grid-line: rgba(238, 247, 243, 0.035);
  --rank-number-bg: #24342f;
  --rank-highlight-bg: rgba(16, 92, 81, 0.36);
  --cue-bg: rgba(238, 247, 243, 0.94);
  --cue-ink: #101816;
  --shadow-soft: 0 18px 46px rgba(0, 0, 0, 0.3);
  --shadow-lift: 0 18px 34px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--body-bg);
  color: var(--ink);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-feature-settings: "ss05";
  transition: background 180ms ease, color 180ms ease;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px);
  background-size: 100% 36px;
  content: "";
  pointer-events: none;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

.app-shell {
  width: min(1180px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--chrome-line);
  border-radius: 8px;
  background: var(--topbar-bg);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(22px);
}

.brand-block {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff7a68, #0f8f7e);
  box-shadow: inset 0 -8px 12px rgba(23, 32, 29, 0.16), 0 10px 24px rgba(15, 143, 126, 0.22);
}

.brand-mark::after {
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.62);
  content: "";
}

.brand-block strong {
  display: block;
  font-size: 1.12rem;
  font-weight: 900;
  line-height: 1.08;
}

.brand-block small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.profile-strip {
  display: grid;
  grid-template-columns: auto auto minmax(130px, 220px) 40px 40px 48px;
  align-items: center;
  gap: 8px;
}

.profile-strip label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.profile-strip input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--control-line);
  border-radius: 8px;
  background: var(--control-bg);
  color: var(--ink);
  outline: none;
  padding: 0 11px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.profile-strip input:focus {
  border-color: rgba(15, 143, 126, 0.5);
  box-shadow: 0 0 0 4px rgba(15, 143, 126, 0.12);
}

.icon-button,
.partner-button,
.language-button,
.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.icon-button,
.partner-button,
.back-button {
  background: var(--control-bg);
  color: var(--control-ink);
  box-shadow: inset 0 0 0 1px var(--control-line);
}

.partner-button {
  min-width: max-content;
  padding: 0 12px;
  font-size: 0.78rem;
  font-weight: 900;
}

.icon-button {
  width: 40px;
}

.icon-button:hover,
.partner-button:hover,
.back-button:hover {
  background: var(--control-bg-hover);
  box-shadow: inset 0 0 0 1px rgba(15, 143, 126, 0.2), 0 8px 18px rgba(46, 37, 29, 0.08);
}

.icon-button:active,
.partner-button:active,
.language-button:active,
.back-button:active {
  transform: translateY(1px);
}

.icon-button svg,
.back-button svg {
  width: 18px;
  height: 18px;
}

.language-button {
  min-width: 48px;
  background: #17201d;
  color: #fffdf8;
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(23, 32, 29, 0.16);
}

.ad-slot {
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--ad-bg);
  color: var(--quiet);
  font-size: 0.8rem;
  font-weight: 800;
}

.ad-slot-top {
  min-height: 92px;
  margin: 16px 0;
}

.ad-slot-inline {
  min-height: 118px;
  margin-top: 16px;
}

.ad-slot-side {
  min-height: 260px;
}

.page {
  display: none;
}

.page.is-active {
  display: block;
}

.hero-line {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 390px);
  align-items: end;
  gap: 24px;
  padding: 38px 4px 22px;
}

.hero-line h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.1rem, 5.3vw, 4.7rem);
  font-weight: 950;
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-line p {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.62;
}

.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--focus);
  font-size: 0.72rem;
  font-weight: 900;
  opacity: 0.82;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.category-tile {
  position: relative;
  display: flex;
  aspect-ratio: 1 / 1;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.34), transparent 42%),
    linear-gradient(150deg, color-mix(in srgb, var(--tile, #64748b) 78%, #ffffff), var(--tile, #64748b));
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-lift), inset 0 -18px 28px rgba(23, 32, 29, 0.16);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.category-tile::before {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  content: "";
}

.category-tile::after {
  position: absolute;
  inset: auto 16px 14px 16px;
  height: 1px;
  background: rgba(255, 255, 255, 0.22);
  content: "";
  pointer-events: none;
}

.category-tile:hover {
  filter: saturate(1.06);
  transform: translateY(-4px);
  box-shadow: 0 24px 42px rgba(46, 37, 29, 0.18), inset 0 -18px 28px rgba(23, 32, 29, 0.18);
}

.category-tile:active {
  transform: translateY(1px) scale(0.992);
  box-shadow: 0 10px 20px rgba(46, 37, 29, 0.12), inset 0 -12px 18px rgba(23, 32, 29, 0.2);
}

.category-tile svg {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  stroke-width: 2;
  filter: drop-shadow(0 8px 12px rgba(23, 32, 29, 0.12));
}

.category-tile .adult-mark,
.category-tile .youtube-mark {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
}

.category-tile .adult-mark {
  width: 44px;
  height: 44px;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-weight: 950;
}

.youtube-mark {
  width: 54px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 16px rgba(23, 32, 29, 0.14);
}

.youtube-mark::before {
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 15px solid #ef4444;
  content: "";
}

.category-tile span:last-child {
  position: relative;
  z-index: 1;
  max-width: 100%;
  padding: 0 8px;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  word-break: keep-all;
  text-shadow: 0 1px 12px rgba(23, 32, 29, 0.22);
}

.back-button {
  gap: 7px;
  margin: 4px 0 14px;
  padding: 0 13px;
  font-weight: 850;
}

.action-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 332px);
  gap: 18px;
  align-items: start;
}

.action-panel,
.ranking-panel {
  overflow: hidden;
  border: 1px solid var(--chrome-line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.benefit-strip {
  display: grid;
  grid-template-columns: minmax(130px, 210px) minmax(0, 1fr);
  gap: 18px;
  padding: 22px;
  background:
    radial-gradient(circle at 0% 0%, rgba(15, 143, 126, 0.26), transparent 18rem),
    linear-gradient(135deg, #1d2a26, #111817);
  color: #fffdf8;
}

.benefit-strip .eyebrow {
  color: #9ee1d3;
}

.benefit-strip h2 {
  margin: 0;
  font-size: 2rem;
  font-weight: 950;
  line-height: 1.05;
  word-break: keep-all;
}

.benefit-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.benefit-list li {
  min-height: 42px;
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
  color: rgba(255, 253, 248, 0.92);
  font-size: 0.87rem;
  font-weight: 650;
  line-height: 1.34;
}

.press-zone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 520px;
  padding: 30px;
  background: var(--press-bg);
}

.count-row {
  position: absolute;
  top: 22px;
  left: 22px;
  right: 22px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.count-row div {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--control-line);
  border-radius: 8px;
  background: var(--control-bg);
  box-shadow: 0 10px 22px rgba(46, 37, 29, 0.06);
}

.count-row .eyebrow {
  color: var(--muted);
}

.count-row strong {
  display: block;
  font-size: 1.62rem;
  font-weight: 950;
  line-height: 1;
}

.relief-button {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: min(318px, 70vw);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: var(--button-side);
  color: #fffdf8;
  cursor: pointer;
  transform: translateY(0);
  box-shadow:
    0 22px 0 var(--button-shadow),
    0 40px 52px rgba(95, 36, 30, 0.26),
    inset 0 -16px 28px rgba(23, 32, 29, 0.2);
  transition: transform 90ms ease, box-shadow 90ms ease;
}

.relief-button::before {
  position: absolute;
  inset: 12px;
  z-index: -1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 22%, rgba(255, 255, 255, 0.5), transparent 28%),
    linear-gradient(150deg, #ff766b, var(--button-top) 52%, #cf423b);
  content: "";
  box-shadow: inset 0 -20px 24px rgba(112, 14, 16, 0.18);
}

.relief-button:hover {
  transform: translateY(-2px);
}

.relief-button:active,
.relief-button.is-pressed {
  transform: translateY(16px);
  box-shadow:
    0 6px 0 var(--button-shadow),
    0 18px 28px rgba(95, 36, 30, 0.22),
    inset 0 -12px 22px rgba(23, 32, 29, 0.18);
}

.button-gloss {
  position: absolute;
  top: 25px;
  left: 58px;
  width: 42%;
  height: 19%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  filter: blur(1px);
  transform: rotate(-18deg);
  pointer-events: none;
}

.button-face {
  display: grid;
  place-items: center;
  gap: 9px;
  font-size: 1.22rem;
  font-weight: 950;
}

.button-face svg {
  width: 42px;
  height: 42px;
  stroke-width: 2;
}

.pulse-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.relief-ripple {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  width: 24px;
  height: 24px;
  border: 3px solid var(--effect, #e23a31);
  border-radius: 50%;
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--effect, #e23a31) 16%, transparent);
  animation: ripple 760ms ease-out forwards;
}

.relief-cue {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  max-width: min(240px, 72vw);
  padding: 9px 13px;
  border: 1px solid color-mix(in srgb, var(--effect, #e23a31) 34%, #ffffff);
  border-radius: 999px;
  background: var(--cue-bg);
  color: var(--cue-ink);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  box-shadow: 0 14px 28px rgba(46, 37, 29, 0.14);
  animation: cue-float 820ms ease-out forwards;
}

.relief-spark {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--effect, #e23a31);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--effect, #e23a31) 14%, transparent);
  animation: spark-fly 680ms ease-out forwards;
}

@keyframes ripple {
  0% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(0.45);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(9);
  }
}

@keyframes cue-float {
  0% {
    opacity: 0;
    transform: translate(-50%, 8px) scale(0.86);
  }

  16% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -96px) scale(1.04);
  }
}

@keyframes spark-fly {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
  }

  18% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, -48px))) scale(0.2);
  }
}

.side-column {
  display: grid;
  gap: 14px;
}

.ranking-panel {
  padding: 14px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
}

.section-head span {
  color: var(--quiet);
  font-size: 0.78rem;
  font-weight: 850;
}

.ranking-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-list li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--control-line);
  border-radius: 8px;
  background: var(--control-bg);
}

.ranking-list li.is-me {
  border-color: rgba(15, 143, 126, 0.34);
  background: var(--rank-highlight-bg);
}

.rank-number {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--rank-number-bg);
  color: var(--control-ink);
  font-size: 0.8rem;
  font-weight: 950;
}

.ranking-list li:nth-child(1) .rank-number {
  background: #f2c94c;
}

.ranking-list li:nth-child(2) .rank-number {
  background: #d8ded9;
}

.ranking-list li:nth-child(3) .rank-number {
  background: #dfa06b;
}

.rank-name {
  min-width: 0;
  overflow: hidden;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-score {
  color: #0f766e;
  font-size: 0.88rem;
  font-weight: 950;
}

.partner-dialog {
  width: min(440px, calc(100vw - 28px));
  border: 1px solid var(--chrome-line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
  padding: 0;
  backdrop-filter: blur(20px);
}

.partner-dialog::backdrop {
  background: rgba(10, 14, 13, 0.52);
  backdrop-filter: blur(6px);
}

.partner-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.partner-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.partner-head h2 {
  margin: 0;
  font-size: 1.32rem;
  font-weight: 950;
}

.partner-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.partner-form input,
.partner-form textarea {
  width: 100%;
  border: 1px solid var(--control-line);
  border-radius: 8px;
  background: var(--control-bg);
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  outline: none;
}

.partner-form input {
  height: 42px;
  padding: 0 11px;
}

.partner-form textarea {
  min-height: 128px;
  padding: 10px 11px;
  resize: vertical;
}

.partner-form input:focus,
.partner-form textarea:focus {
  border-color: rgba(15, 143, 126, 0.5);
  box-shadow: 0 0 0 4px rgba(15, 143, 126, 0.12);
}

.form-status {
  min-height: 1.2em;
  margin: 0;
  color: var(--focus);
  font-size: 0.82rem;
  font-weight: 850;
}

.partner-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.partner-actions .back-button {
  margin: 0;
}

.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-width: 78px;
  border-radius: 8px;
  background: #0f8f7e;
  color: #fffdf8;
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(15, 143, 126, 0.2);
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

@media (max-width: 900px) {
  .hero-line,
  .action-layout {
    grid-template-columns: 1fr;
  }

  .ad-slot-side {
    min-height: 140px;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 12px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-strip {
    grid-template-columns: auto auto minmax(0, 1fr) 40px 40px 48px;
  }

  .hero-line {
    gap: 12px;
    padding-top: 24px;
  }

  .category-grid {
    gap: 9px;
  }

  .benefit-strip,
  .benefit-list {
    grid-template-columns: 1fr;
  }

  .press-zone {
    min-height: 430px;
    padding: 22px;
  }

  .relief-button {
    width: min(260px, 68vw);
  }
}

@media (max-width: 430px) {
  .profile-strip {
    grid-template-columns: auto 1fr 40px 40px 48px;
  }

  .profile-strip label {
    display: none;
  }

  .hero-line h1 {
    font-size: 2.2rem;
  }

  .category-tile {
    gap: 7px;
  }

  .category-tile svg {
    width: 30px;
    height: 30px;
  }

  .category-tile .adult-mark {
    width: 34px;
    height: 34px;
    font-size: 0.75rem;
  }

  .youtube-mark {
    width: 40px;
    height: 29px;
  }

  .category-tile span:last-child {
    font-size: 0.78rem;
  }
}
