:root {
  color-scheme: light;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --page: #f1f5ed; --ink: #24392e; --muted: #5c7063;
  --accent: #285a44; --accent-dark: #1f4937; --wash: #dce8cc; --line: #285a4426;
}
* { box-sizing: border-box; }
html { background: var(--page); }
body { margin: 0; color: var(--ink); background: var(--page); font-size: 16px; -webkit-font-smoothing: antialiased; }
body.agit { --page: #f8f1e8; --ink: #3c3029; --muted: #7b6859; --accent: #865b38; --accent-dark: #6f492b; --wash: #efdbc0; --line: #865b3826; }
body.pajang { --page: #f6eff5; --ink: #3f2c3c; --muted: #7b6476; --accent: #8b4164; --accent-dark: #71334f; --wash: #e9d5e8; --line: #8b416426; }
.app-entry {
  min-height: 100vh; min-height: 100svh;
  padding: 28px 24px 20px;
  padding-top: max(28px, env(safe-area-inset-top));
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  overflow: hidden;
  background: radial-gradient(ellipse at 88% 46%, var(--wash), transparent 62%), linear-gradient(155deg, #ffffffb8, #ffffff00 55%);
}
.entry-panel {
  width: min(100%, 440px);
  min-height: calc(100vh - 48px);
  min-height: calc(100svh - max(28px, env(safe-area-inset-top)) - max(20px, env(safe-area-inset-bottom)));
  margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(220px, 1fr) auto;
}
.entry-brand { display: flex; align-items: center; gap: 10px; }
.entry-brand img { display: block; width: 36px; height: 36px; border-radius: 11px; }
.entry-brand h1 { margin: 0; font-size: 20px; line-height: 1.35; font-weight: 750; letter-spacing: -.045em; }
.entry-brand h1 span { margin-left: 4px; color: var(--accent); font-weight: 600; }
.entry-badge { margin-left: auto; padding: 5px 10px; color: var(--accent); border: 1px solid var(--line); border-radius: 50px; font-size: 14px; font-weight: 650; line-height: 1.4; }
.entry-copy { position: relative; z-index: 1; margin-top: clamp(28px, 5svh, 48px); }
.entry-eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; color: var(--accent); font-size: 14px; font-weight: 600; line-height: 1.5; letter-spacing: -.025em; }
.entry-eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .65; }
.entry-copy h2 { margin: 0; font-size: clamp(28px, 8.5vw, 38px); font-weight: 750; line-height: 1.28; letter-spacing: -.055em; word-break: keep-all; }
.entry-copy h2 em { color: var(--accent); font-style: normal; }
.entry-description { margin: 15px 0 0; color: var(--muted); font-size: 16px; line-height: 1.65; letter-spacing: -.035em; word-break: keep-all; }
.entry-scene { position: relative; display: grid; place-items: center; min-width: 0; margin: 2px -16px 0; padding-block: 10px; }
.entry-art { display: block; width: min(100%, 380px); height: auto; max-height: 40svh; min-height: 200px; object-fit: contain; pointer-events: none; }
.pajang .entry-art { width: min(110%, 430px); max-width: 110%; transform: translateY(-2%); }
.entry-actions { position: relative; z-index: 1; padding-top: 8px; }
.entry-actions a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; text-decoration: none; }
.entry-enter {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 58px; padding: 16px 20px;
  border: 1px solid #ffffff26; border-radius: 18px; color: #fff;
  background: linear-gradient(120deg, var(--accent), var(--accent-dark));
  box-shadow: 0 8px 20px var(--line), inset 0 1px #ffffff1c;
  font-size: 18px; font-weight: 650; line-height: 1.4; letter-spacing: -.025em;
}
.entry-secondary-links { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; }
.entry-secondary { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 7px; padding: 10px 16px; border-radius: 12px; color: var(--muted); font-size: 14px; font-weight: 550; line-height: 1.5; letter-spacing: -.025em; }
.entry-secondary-links::before { content: ""; order: 1; width: 1px; height: 13px; background: var(--line); }
.entry-about { order: 2; }
.entry-secondary svg { width: 18px; height: 18px; flex: none; }
.entry-actions a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.entry-enter:active, .entry-secondary:active { transform: translateY(1px); }
@media (hover: hover) {
  .entry-enter:hover { filter: brightness(1.08); }
  .entry-secondary:hover { color: var(--accent); background: #ffffff80; }
}
@media (prefers-reduced-motion: no-preference) {
  .entry-enter, .entry-secondary { transition: transform .18s ease, background .18s ease, filter .18s ease; }
}
@media (max-width: 359px) {
  .app-entry { padding-inline: 20px; }
  .entry-brand h1 { font-size: 19px; }
  .entry-copy h2 { font-size: 28px; }
  .entry-description { font-size: 15px; }
  .entry-secondary { padding-inline: 14px; }
}
@media (max-height: 700px) and (max-width: 679px) {
  .app-entry { padding-top: max(20px, env(safe-area-inset-top)); padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .entry-panel { min-height: calc(100svh - max(20px, env(safe-area-inset-top)) - max(12px, env(safe-area-inset-bottom))); grid-template-rows: auto auto minmax(180px, 1fr) auto; }
  .entry-copy { margin-top: 24px; }
  .entry-copy h2 { font-size: clamp(28px, 7.9vw, 34px); }
  .entry-description { margin-top: 10px; }
  .entry-art { min-height: 180px; max-height: 33svh; }
  .entry-scene { padding-block: 4px; }
}
@media (min-width: 680px) {
  .app-entry { padding: 36px 40px 28px; }
  .entry-panel { width: min(100%, 1080px); min-height: calc(100svh - 64px); grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); grid-template-rows: auto 1fr auto .5fr; column-gap: 16px; }
  .entry-brand { grid-column: 1 / -1; }
  .entry-brand img { width: 40px; height: 40px; }
  .entry-brand h1 { font-size: 23px; }
  .entry-badge { margin-left: 6px; }
  .entry-copy { grid-column: 1; grid-row: 2; align-self: end; margin: 50px 0 0; }
  .entry-copy h2 { font-size: clamp(32px, 4.4vw, 52px); }
  .entry-eyebrow { margin-bottom: 18px; font-size: 15px; }
  .entry-description { max-width: 320px; margin-top: 20px; font-size: 17px; }
  .entry-scene { grid-column: 2; grid-row: 2 / 5; margin: 0 -20px 0 -24px; padding: 20px 0 48px; }
  .entry-art { width: 100%; max-height: 580px; min-height: 0; }
  .pajang .entry-art { width: 112%; max-width: 112%; }
  .entry-actions { grid-column: 1; grid-row: 3; width: min(100%, 320px); padding-top: 36px; }
  .entry-enter { min-height: 60px; }
}
@media (min-width: 680px) and (max-width: 820px) and (min-height: 650px) {
  .entry-panel { width: min(100%, 590px); grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(260px, 1fr) auto; }
  .entry-brand { grid-column: 1; }
  .entry-copy { grid-column: 1; grid-row: 2; margin-top: 30px; text-align: center; }
  .entry-copy h2 { font-size: 38px; }
  .entry-eyebrow { justify-content: center; margin-bottom: 12px; }
  .entry-description { max-width: none; margin-top: 12px; }
  .entry-scene { grid-column: 1; grid-row: 3; margin: -6px 0 0; padding: 0; }
  .entry-art { width: 290px; max-height: 290px; }
  .pajang .entry-art { width: 330px; max-width: 100%; }
  .entry-actions { grid-column: 1; grid-row: 4; justify-self: center; padding-top: 6px; width: min(100%, 420px); }
}
