:root {
  --paper: #ffffff;
  --wash: #f6f7f5;
  --line: #d7d9d5;
  --line-strong: #bfc3bd;
  --ink: #2f302f;
  --muted: #8b908c;
  --soft: #ecefeb;
  --accent: #3c7f6f;
  --accent-soft: #dff0ea;
  --warning: #b84a3d;
  --focus: #287c68;
  --shadow: 0 1px 5px rgba(25, 28, 25, 0.14);
  color-scheme: light;
  font-family:
    "Pretendard Variable",
    "Pretendard",
    "Apple SD Gothic Neo",
    "Noto Sans KR",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
}

* {
  box-sizing: border-box;
}

img {
  max-width: 100%;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  letter-spacing: 0;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  word-break: keep-all;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

body[data-route="home"] .app-shell {
  display: block;
}

body[data-route="home"] .topbar {
  display: none;
}

.topbar {
  height: 70px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 8vw, 168px);
  background: rgba(255, 255, 255, 0.92);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
}

.brand img {
  width: 148px;
  height: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 30px);
}

.nav-links a,
.text-link {
  border: 0;
  background: transparent;
  color: #5f625f;
  font-weight: 560;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
}

.nav-links a {
  font-size: 18px;
}

.nav-links a.active {
  color: var(--ink);
  text-decoration-thickness: 2px;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
}

.lang-toggle button {
  min-width: 38px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #747974;
  font-size: 13px;
  font-weight: 650;
}

.lang-toggle button.active {
  background: var(--ink);
  color: var(--paper);
}

.lang-toggle button:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 3px;
}

.content {
  outline: 0;
}

.page {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 38px clamp(20px, 5vw, 72px) 96px;
}

.page-centered {
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.section-kicker {
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 22px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(25px, 4vw, 38px);
  line-height: 1.25;
  margin-bottom: 16px;
  font-weight: 700;
}

h2 {
  font-size: 21px;
  margin-bottom: 22px;
}

.lead {
  color: var(--muted);
  font-weight: 520;
  line-height: 1.7;
  max-width: 820px;
  margin-bottom: 14px;
}

.muted {
  color: var(--muted);
  font-weight: 450;
  line-height: 1.8;
}

.idea-form,
.email-form {
  display: grid;
  gap: 16px;
}

.idea-form {
  max-width: 860px;
  margin-top: 34px;
}

.llm-home {
  min-height: calc(100svh - 60px);
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(34px, 8vh, 86px) 24px;
  text-align: center;
}

.home-lang-toggle {
  position: absolute;
  top: clamp(18px, 4vw, 34px);
  right: clamp(18px, 5vw, 58px);
}

.llm-home-logo {
  width: min(62vw, 278px);
  height: auto;
  display: block;
  margin-bottom: clamp(54px, 12vh, 128px);
  filter: drop-shadow(0 18px 40px rgba(255, 255, 255, 0.08));
}

.llm-home h1 {
  color: var(--ink);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 650;
  line-height: 1.24;
  margin-bottom: 16px;
}

.title-chip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--wash);
  color: #666b66;
  padding: 0 14px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 560;
}

.llm-home .lead {
  max-width: 780px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 500;
  margin: 0 auto 34px;
}

.llm-prompt-form {
  width: min(100%, 760px);
  max-width: 760px;
  margin-top: 0;
  gap: 10px;
}

.prompt-note {
  color: #6d746f;
  font-size: 14px;
  font-weight: 450;
  line-height: 1.5;
  margin: 0 0 2px;
}

.llm-prompt-shell {
  min-height: 72px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #f4f4f4;
  box-shadow: 0 16px 44px rgba(25, 28, 25, 0.12);
}

.prompt-input-wrap {
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
}

.llm-prompt-shell textarea {
  width: 100%;
  min-height: 42px;
  max-height: 104px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 9px 0;
  resize: none;
  overflow-y: auto;
  box-shadow: none;
  position: relative;
  z-index: 1;
}

.llm-prompt-shell textarea:focus {
  border-color: transparent;
  box-shadow: none;
}

.llm-prompt-shell textarea::placeholder {
  color: transparent;
}

.prompt-placeholder {
  position: absolute;
  inset: 50% 0 auto;
  transform: translateY(-50%);
  color: #8d918d;
  font-weight: 450;
  line-height: 1.35;
  overflow: hidden;
  pointer-events: none;
  text-align: left;
  white-space: nowrap;
  z-index: 0;
}

.prompt-placeholder span {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.llm-prompt-shell.has-value .prompt-placeholder {
  opacity: 0;
}

.prompt-icon-button,
.prompt-submit-button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 28px;
  line-height: 1;
}

.prompt-icon-button {
  background: transparent;
  color: var(--ink);
}

.prompt-submit-button {
  background: var(--ink);
  color: var(--paper);
  font-size: 24px;
  font-weight: 700;
}

.llm-prompt-form .field-meta {
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.llm-prompt-form .field-meta span {
  display: none;
}

.shortcut-hint {
  color: #777d78;
  font-size: 13px;
  font-weight: 430;
}

.shortcut-hint kbd {
  min-width: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-bottom-color: var(--line-strong);
  border-radius: 6px;
  background: var(--paper);
  color: #505451;
  padding: 1px 6px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(25, 28, 25, 0.08);
}

.llm-prompt-form .field-error {
  color: var(--warning);
  text-align: center;
}

.prompt-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.prompt-chips span {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  color: #646a65;
  background: #ffffff;
  font-weight: 450;
}

.hero-logo {
  width: min(100%, 308px);
  margin-bottom: 28px;
}

.hero-logo img {
  width: 100%;
  height: auto;
  display: block;
}

.idea-form label,
.email-form label {
  font-weight: 650;
  font-size: 19px;
}

textarea,
input[type="email"] {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

textarea {
  min-height: 104px;
  resize: vertical;
  padding: 18px 20px;
  font-size: 17px;
  line-height: 1.55;
}

input[type="email"] {
  height: 58px;
  padding: 0 18px;
  font-size: 18px;
}

textarea:focus,
input[type="email"]:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

textarea::placeholder,
input::placeholder {
  color: #777777;
}

.field-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-weight: 430;
}

.field-meta p {
  margin: 0;
}

.field-error {
  min-height: 22px;
  color: var(--warning);
  font-weight: 600;
  margin: 0;
}

.button {
  min-height: 58px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 26px;
  font-size: 18px;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

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

.button:focus-visible,
.text-link:focus-visible,
.nav-links a:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 4px;
}

.button-primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.button-primary:hover {
  box-shadow: 0 6px 18px rgba(25, 28, 25, 0.18);
}

.button-secondary {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.button-plain {
  background: transparent;
  color: #626661;
  text-decoration: underline;
}

.button-wide {
  width: 100%;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  box-shadow: none;
}

.help-panel,
.notice-card,
.result-card,
.variant-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: var(--paper);
}

.help-panel {
  max-width: 860px;
  margin-top: 34px;
  padding: 22px;
  color: var(--muted);
  font-weight: 430;
}

.help-panel strong {
  display: block;
  color: var(--muted);
  margin-bottom: 18px;
}

.help-panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.help-panel li::before {
  content: "· ";
}

.compact-form {
  margin-top: 34px;
}

.actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.align-right {
  justify-content: flex-end;
}

.center {
  justify-content: center;
}

.space-between {
  justify-content: space-between;
  align-items: center;
}

.page-loading {
  text-align: center;
}

.loading-card {
  width: min(100%, 320px);
  margin: 34px auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px 22px 20px;
  box-shadow: var(--shadow);
}

.event-logo-loader {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.event-logo-loader img {
  width: 184px;
  height: auto;
  display: block;
}

.loading-status {
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 22px;
}

.loading-dots {
  display: inline-flex;
  gap: 5px;
  margin-bottom: 24px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--line-strong);
  animation: pulse 950ms ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
  animation-delay: 140ms;
}

.loading-dots span:nth-child(3) {
  animation-delay: 280ms;
}

.progress-line {
  height: 24px;
  border-radius: 999px;
  background: var(--soft);
  overflow: hidden;
}

.progress-line span {
  display: block;
  height: 100%;
  width: 67%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ink), var(--accent));
  animation: progress 2.5s ease-in-out infinite;
}

.progress-caption {
  color: var(--muted);
  font-weight: 500;
  margin: 12px 0 0;
}

.loading-ready {
  display: grid;
  justify-items: center;
  gap: 16px;
}

.loading-ready strong {
  font-size: 23px;
}

.loading-ready p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.primary-result {
  min-height: 374px;
  padding: 24px;
  display: grid;
  gap: 26px;
  position: relative;
  animation: reveal 360ms ease both;
}

.event-copy,
.event-host {
  margin-bottom: 10px;
}

.event-copy {
  color: var(--ink);
  font-weight: 650;
}

.event-host {
  color: var(--accent);
  font-weight: 650;
}

.data-disclaimer {
  color: #d12f2f;
  font-size: 17px;
  font-weight: 650;
  margin-bottom: 18px;
}

.organizer-section {
  max-width: 860px;
  margin-top: 28px;
}

.llm-home .organizer-section {
  width: min(100%, 920px);
  margin-top: 40px;
}

.organizer-section h2 {
  color: var(--muted);
  font-size: 14px;
  font-weight: 560;
  margin-bottom: 12px;
}

.organizer-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(22px, 3.6vw, 42px);
  padding: 4px clamp(12px, 2vw, 24px);
  overflow-x: auto;
}

.organizer-item {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.organizer-item img {
  width: auto;
  max-width: 100%;
  height: 31px;
  flex: 0 0 auto;
  object-fit: contain;
}

.result-row {
  display: grid;
  gap: 12px;
}

.result-row .label {
  color: var(--muted);
  font-weight: 520;
}

.result-row strong {
  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
}

.result-row p {
  margin: 0;
  font-size: 18px;
  line-height: 1.7;
  color: #626662;
  font-weight: 450;
}

.copy-main {
  position: absolute;
  right: 22px;
  bottom: 18px;
}

.variant-section {
  margin: 26px 0 24px;
}

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

.variant-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 650;
}

.variant-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 430;
}

.variant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 16px;
  margin: 0;
}

.variant-card {
  min-height: 112px;
  padding: 20px 24px;
  text-align: left;
}

.variant-card span {
  color: var(--muted);
  font-weight: 500;
}

.variant-card strong {
  display: block;
  margin-top: 20px;
  font-size: 22px;
  font-weight: 650;
}

.result-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 22px 0;
}

fieldset {
  margin: 0;
  min-width: 0;
}

legend {
  font-size: 22px;
  font-weight: 650;
  padding: 0;
  margin-bottom: 14px;
}

.notice-card {
  padding: 24px;
  margin-bottom: 28px;
  text-align: left;
}

.notice-card h2 {
  font-size: 28px;
  margin-bottom: 24px;
}

.notice-card p,
.notice-card strong {
  display: block;
  color: var(--muted);
  font-weight: 450;
  line-height: 1.9;
}

.rule-list {
  margin: 22px 0 28px;
  color: var(--muted);
  font-weight: 450;
}

.rule-list.compact {
  text-align: left;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.standalone {
  display: inline-block;
  margin-top: 20px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translate(-50%, 16px);
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 20;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.footer {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  background: var(--wash);
  color: #8f948f;
  font-weight: 450;
  padding: 0 clamp(20px, 8vw, 168px);
}

.footer strong {
  color: #b0b5b0;
  font-size: 12px;
  font-weight: 450;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@keyframes progress {
  0%,
  100% {
    width: 42%;
  }
  50% {
    width: 84%;
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .topbar {
    padding-left: clamp(20px, 5vw, 44px);
    padding-right: clamp(20px, 5vw, 44px);
  }

  .page {
    padding-left: clamp(18px, 5vw, 40px);
    padding-right: clamp(18px, 5vw, 40px);
  }

  .primary-result {
    min-height: auto;
    padding: clamp(20px, 4vw, 26px);
  }

  .copy-main {
    position: static;
    width: fit-content;
    justify-self: end;
    margin-top: 2px;
  }

  .result-actions {
    justify-content: flex-start;
  }

  .notice-card {
    padding: clamp(20px, 4vw, 24px);
  }
}

@media (max-width: 760px) {
  .topbar {
    height: auto;
    padding-top: 16px;
    padding-bottom: 16px;
    align-items: flex-start;
    gap: 14px;
    flex-direction: column;
  }

  .brand {
    font-size: 20px;
  }

  .brand img {
    width: 132px;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  .lang-toggle button {
    min-width: 36px;
  }

  .page {
    padding-top: 30px;
    padding-bottom: 70px;
  }

  .idea-form,
  .help-panel,
  .organizer-section {
    max-width: none;
  }

  .hero-logo {
    width: min(78vw, 260px);
  }

  .llm-home {
    justify-content: flex-start;
    min-height: auto;
    padding-top: 72px;
    padding-bottom: 64px;
  }

  .home-lang-toggle {
    top: 18px;
    right: 18px;
  }

  .llm-home-logo {
    width: min(64vw, 242px);
    margin-bottom: clamp(44px, 9vh, 64px);
  }

  .llm-home h1 {
    max-width: 21rem;
  }

  .llm-home .lead {
    font-size: 16px;
    margin-bottom: 28px;
  }

  .llm-prompt-shell {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    min-height: 62px;
  }

  .prompt-icon-button,
  .prompt-submit-button {
    width: 38px;
    height: 38px;
  }

  .llm-prompt-form .field-meta {
    align-items: center;
  }

  .organizer-list {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 22px;
    padding-left: 6px;
    padding-right: 6px;
    overflow-x: visible;
  }

  .organizer-item {
    width: calc(50% - 17px);
  }

  .organizer-item img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 28px;
  }

  .field-meta,
  .result-actions,
  .space-between {
    align-items: stretch;
    flex-direction: column;
  }

  .variant-grid {
    grid-template-columns: 1fr;
  }

  .variant-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .copy-main {
    width: 100%;
    margin-top: 10px;
  }

  .button {
    width: 100%;
  }

  .actions {
    width: 100%;
  }

  .star-group {
    justify-content: flex-start;
    gap: 10px;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-top: 16px;
    padding-bottom: 16px;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 15px;
  }

  h1 {
    font-size: 27px;
  }

  .page {
    padding: 28px 20px 64px;
  }

  .topbar {
    padding-left: 20px;
    padding-right: 20px;
  }

  .llm-home {
    padding-left: 20px;
    padding-right: 20px;
  }

  .llm-prompt-shell {
    border-radius: 28px;
    align-items: end;
  }

  .llm-prompt-shell textarea {
    min-height: 44px;
    line-height: 1.45;
  }

  .prompt-placeholder {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
  }

  .prompt-placeholder span {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
  }

  .llm-prompt-shell.placeholder-overflow .prompt-placeholder span {
    animation: placeholder-pan 6.5s ease-in-out infinite alternate;
  }

  .prompt-chips {
    gap: 8px;
  }

  .prompt-chips span {
    min-height: 38px;
    padding: 0 14px;
    font-size: 14px;
  }

  .shortcut-hint {
    max-width: 18rem;
    line-height: 1.7;
  }

  .primary-result {
    gap: 22px;
  }

  .result-row strong {
    font-size: 27px;
  }

  .result-row p {
    font-size: 16px;
  }

  .variant-card {
    min-height: 100px;
    padding: 18px 20px;
  }

  .variant-card strong {
    margin-top: 16px;
  }

  .data-disclaimer {
    font-size: 15px;
    line-height: 1.55;
  }

  .notice-card h2 {
    font-size: 24px;
  }

  .footer {
    min-height: auto;
    padding-left: 20px;
    padding-right: 20px;
    line-height: 1.6;
  }
}

@keyframes placeholder-pan {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(-1 * var(--placeholder-shift, 0px)));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
