/* ivLis STUDIO's palette, typography, pill controls and spring motion.
   Reference: main-website/src/css/style.css. Kept self-contained for PHP hosting. */
:root {
  --grey50: #f9fafb; --grey100: #f2f4f6; --grey200: #e5e8eb; --grey300: #d1d6db; --grey400: #b0b8c1;
  --grey500: #8b95a1; --grey600: #6b7684; --grey700: #4e5968; --grey800: #333d4b; --grey900: #191f28;
  --blue50: #e8f3ff; --blue100: #c9e2ff; --blue200: #90c2ff; --blue300: #64a8ff; --blue400: #4593fc;
  --blue500: #3182f6; --blue600: #2272eb; --blue700: #1b64da; --blue800: #1957c2;
  --green50: #e9f9f1; --green500: #03b26c; --green600: #029359;
  --yellow500: #ffc342; --purple500: #6d5cf5;
  --r-xl: 32px; --r-l: 24px; --r-m: 18px;
  --shadow-s: 0 2px 10px rgba(2,32,71,.07); --shadow-m: 0 14px 34px rgba(2,32,71,.11);
  --ease-out: cubic-bezier(.22,1,.36,1); --spring: cubic-bezier(.34,1.4,.64,1); --bounce: cubic-bezier(.34,1.8,.64,1);
  --gutter: clamp(20px,4vw,56px); --radius: var(--r-l);
  --paper: #fff; --ink: var(--grey900); --muted: var(--grey700); --forest: var(--blue700); --leaf: var(--blue50); --line: var(--grey200);
}
html { scroll-padding-top: 100px; -webkit-text-size-adjust: 100%; }
body { overflow-wrap: break-word; }
::selection { background: var(--blue100); color: var(--grey900); }
:focus-visible { outline: 3px solid var(--blue400); outline-offset: 3px; }
.wrap { max-width: 1292px; padding-inline: var(--gutter); }
.header {
  position: sticky; top: 0; z-index: 40; height: 76px; gap: 24px;
  max-width: none; padding-inline: max(var(--gutter), calc((100vw - 1180px)/2));
  background: #fff; box-shadow: 0 1px 0 var(--grey200);
}
.header.is-scrolled { box-shadow: 0 1px 0 var(--grey200); }
.brand { font: 800 26px/1 Pretendard,sans-serif; letter-spacing: -.9px; gap: 9px; }
.brand-light { font-weight: 350; }
.brand-icon { width: 34px; height: 34px; border-radius: 11px; background: var(--blue500); color: #fff; }
.brand-icon .icon { width: 21px; height: 21px; }
.brand-dot { color: var(--blue500); }
.main-nav { gap: 4px; font-size: 15px; }
.main-nav a { padding: 10px 14px; border-radius: 10px; color: var(--grey700); }
.main-nav a:hover { background: var(--grey100); color: var(--grey900); }
.main-nav a[aria-current] { color: var(--blue700); background: var(--blue50); }
.main-nav a[aria-current]::after { display: none; }
.saved-nav { background: var(--grey100); border: 0; border-radius: 12px; }
.saved-nav:hover { background: var(--grey200); }
.saved-count { background: #fff; color: var(--blue700); }
.hero-shell { max-width: 1392px; padding-inline: 24px; padding-top: 8px; }
.hero { padding: 56px 64px 30px; border: 0; border-radius: var(--r-xl); background: var(--blue700); color: #fff; }
.hero-top { grid-template-columns: 1.3fr 1fr; gap: 22px; padding-bottom: 40px; }
.hero-copy .eyebrow { display: inline-flex; padding: 8px 14px; border-radius: 99px; background: #fff; color: var(--grey900); font-size: 13px; font-weight: 700; letter-spacing: -.2px; }
.tiny-star { width: 8px; height: 8px; border-radius: 50%; background: var(--blue500); }
.hero h1 { font-size: clamp(44px,5.2vw,72px); font-weight: 800; line-height: 1.13; letter-spacing: -.045em; margin: 24px 0 22px; }
.highlight { color: #fff; }
.highlight::after { display: none; }
.hero-description { color: #fff; font-size: 17px; font-weight: 500; line-height: 1.7; letter-spacing: -.3px; }
.word-play { position: relative; height: 295px; min-width: 0; user-select: none; pointer-events: none; }
.letter-tile { position: absolute; display: grid; place-content: center; text-align: center; width: 119px; height: 127px; border-radius: 30px; font-size: 72px; font-weight: 800; line-height: 1; letter-spacing: -.05em; }
.tile-one { left: 5%; top: 52px; color: var(--blue500); background: #fff; transform: rotate(-13deg); box-shadow: 0 9px 0 #c9e2ff, 0 22px 30px #1957c233; z-index: 2; }
.tile-two { left: 37%; top: 21px; color: var(--grey900); background: var(--yellow500); transform: rotate(12deg); box-shadow: 0 9px 0 #d99c20, 0 22px 30px #1957c233; z-index: 1; }
.tile-three { left: 48%; top: 143px; width: 155px; height: 135px; color: #fff; background: var(--grey900); transform: rotate(-7deg); box-shadow: 0 9px 0 #11161e, 0 22px 30px #1957c233; z-index: 3; }
.tile-three > span { display: block; font-size: 13px; font-weight: 600; letter-spacing: 0; margin-top: 8px; }
.play-orbit { position: absolute; inset: 11% 0 2%; border: 1px solid #ffffff45; border-radius: 50%; transform: rotate(-25deg); }
.play-spark { position: absolute; right: 2%; top: 22px; color: #fff; font: 94px/1 sans-serif; transform: rotate(12deg); }
.word-sticker { position: absolute; border-radius: 99px; padding: 10px 16px; font-size: 14px; font-weight: 650; white-space: nowrap; z-index: 4; background: #fff; color: var(--grey800); box-shadow: var(--shadow-s); }
.sticker-one { top: -3px; left: 0; transform: rotate(-6deg); }
.sticker-two { bottom: 5px; left: 0; color: var(--grey900); background: #b7f4d5; transform: rotate(6deg); }
.search-area { color: var(--grey900); }
.search-modes { gap: 8px; margin-bottom: 14px; }
.search-modes span { border: 0; padding: 10px 18px; min-height: 44px; border-radius: 99px; font-size: 14px; color: #fff; font-weight: 600; }
.search-modes input:checked + span { color: var(--blue700); background: #fff; box-shadow: var(--shadow-s); }
.search-modes input:focus-visible + span { outline-color: var(--grey900); }
.search-field { min-height: 80px; border: 2px solid transparent; border-radius: 22px; padding: 8px 9px 8px 24px; box-shadow: 0 12px 28px #1957c229; }
.search-field:focus-within { border-color: var(--blue100); box-shadow: 0 0 0 4px #ffffff38; }
.search-field > .icon { color: var(--grey600); }
.search-field input { font-size: 20px; color: var(--grey900); }
.search-field input::placeholder { color: var(--grey600); }
.search-submit { border-radius: 99px; min-height: 58px; padding: 7px 9px 7px 22px; gap: 20px; background: var(--grey100); color: var(--grey900); font-size: 16px; font-weight: 700; }
.search-submit .icon { box-sizing: content-box; width: 19px; height: 19px; padding: 11px; border-radius: 50%; color: #fff; background: var(--grey900); transition: transform .6s var(--bounce); }
.search-submit:hover { background: var(--grey200); }
.search-submit:hover .icon { transform: translateX(2px) rotate(-8deg); }
.search-foot, .suggested-words > span, .suggested-words a, .suggested-words a span, .search-hint { color: #fff; }
.suggested-words a { display: inline-flex; align-items: center; min-height: 32px; font-weight: 600; }
.suggested-words a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.language-label > span { background: #fff; }
.suggestions { top: auto; margin-top: 8px; border-radius: var(--r-m); box-shadow: var(--shadow-m); }
.suggestion { border-radius: 12px; }
.suggestion:hover, .suggestion[aria-selected=true] { background: var(--blue50); }
.compact .hero { background: var(--grey100); color: var(--ink); padding: 24px 32px; }
.compact .search-modes { margin-bottom: 12px; }
.compact .search-modes span { color: var(--grey700); }
.compact .search-modes input:checked + span { color: var(--blue700); background: #fff; }
.compact .search-field { border: 1px solid var(--grey200); min-height: 70px; box-shadow: none; }
.compact .search-field:focus-within { border-color: var(--blue400); box-shadow: 0 0 0 3px var(--blue100); }
.compact .search-submit { padding: 5px 7px 5px 20px; min-height: 52px; }
.compact .search-foot, .compact .suggested-words > span, .compact .suggested-words a, .compact .suggested-words a span, .compact .search-hint { color: var(--grey700); }
.compact .language-label > span { background: var(--blue500); }
.content-wrap { padding-top: 64px; }
.eyebrow { color: var(--blue700); font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.section-heading { margin-bottom: 28px; align-items: flex-end; }
.section-heading h2 { font-size: clamp(25px,2.8vw,36px); font-weight: 750; letter-spacing: -.035em; line-height: 1.4; margin-top: 10px; }
.text-link { padding: 8px 16px; background: var(--grey100); border-radius: 99px; color: var(--grey700); font-size: 13px; font-weight: 650; white-space: nowrap; }
.text-link:hover { background: var(--grey200); }
.tool-home { margin-bottom: 72px; }
.tool-home-grid { gap: 20px; }
.tool-home-card { padding: 28px; border: 0; background: var(--grey100); border-radius: var(--r-xl); position: relative; transition: transform .65s var(--bounce), box-shadow .3s; }
.tool-home-card > .tool-symbol { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 20px; background: var(--blue500); color: #fff; font-size: 35px; margin-bottom: 26px; }
.tool-home-card:nth-child(2) > .tool-symbol { background: var(--yellow500); color: var(--grey900); }
.tool-home-card:nth-child(3) > .tool-symbol { background: #b7f4d5; color: var(--grey900); }
.tool-home-card > .tool-go { position: absolute; right: 24px; top: 28px; font-size: 22px; color: var(--grey600); }
.tool-home-card h3 { font-size: 24px; font-weight: 750; letter-spacing: -.6px; margin-bottom: 9px; }
.tool-home-card p { font-size: 15px; line-height: 1.7; color: var(--grey700); }
.daily-card { background: var(--blue50); border: 0; border-radius: var(--r-xl); padding: 28px 32px; }
.daily-card::after { border-color: var(--blue100); }
.daily-word h3 { color: var(--grey900); font-weight: 800; }
.daily-top > span { color: var(--blue700); font-size: 14px; }
.round-link { background: var(--grey900); color: #fff; }
.topic-card { border: 0; border-radius: var(--r-l); background: var(--grey100); }
.topic-card.warm { background: #fff5df; }
.bottom-note { margin-block: 60px 32px; background: var(--grey100); border: 0; border-radius: var(--r-l); }
.bottom-note h2 { color: var(--grey900); }
.note-mark { color: var(--blue500); }
.entry-card, .collection-card, .word-card, .paper-panel { border-radius: var(--r-l); border-color: var(--grey200); }
.entry-card { box-shadow: none; }
.pos-label, .tiny-chip { background: var(--grey100); color: var(--grey700); }
.filter.active, .filter[aria-current] { color: #fff; background: var(--blue700); border-color: var(--blue700); }
.studio-intro { padding: 48px 0 32px; }
.studio-intro h1 { font-size: clamp(30px,3.2vw,44px); font-weight: 800; letter-spacing: -.04em; }
.studio-intro p:last-child { font-size: 16px; }
.studio-seal { font: 100px/1 sans-serif; color: var(--blue500); }
.tool-tabs { gap: 6px; padding: 8px; border: 0; background: var(--grey100); border-radius: 18px; scrollbar-width: thin; scroll-padding-inline: 8px; }
.tool-tabs a { border-radius: 12px; min-height: 44px; padding: 10px 16px; font-weight: 650; color: var(--grey700); }
.tool-tabs a[aria-current] { background: #fff; box-shadow: var(--shadow-s); color: var(--blue700); }
.tool-tabs a:hover { background: #fff; color: var(--blue700); }
.filter-panel { background: var(--grey100); border: 0; border-radius: var(--r-l); }
.field { color: var(--grey700); font-size: 14px; }
.field input, .field select, .field textarea, .writer-metrics input { border-color: var(--grey200); border-radius: 12px; min-height: 44px; font-size: 16px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--blue400); }
.primary-button { background: var(--blue700); font-weight: 700; border-radius: 14px; }
.primary-button:hover { background: var(--blue800); }
.secondary-button { color: var(--grey800); background: var(--grey100); border: 0; border-radius: 14px; }
.secondary-button:hover { background: var(--grey200); }
.preset-row button, .chip-button, .pill-link { border-color: var(--grey200); min-height: 44px; }
.word-actions button { min-height: 40px; border-radius: 10px; }
.word-card h3 { font-size: 28px; font-weight: 750; }
.word-card h3 button:hover, .subtle-button, .source-link { color: var(--blue700); }
.word-card:focus-within { border-color: var(--blue300); }
.map-canvas { background: var(--grey50); }
.map-node.center { background: var(--blue700); color: #fff; }
.studio-footer { margin-top: 56px; }
.footer { margin-top: 64px; }
dialog { border-radius: var(--r-xl); }
dialog::backdrop { background: #191f2870; backdrop-filter: none; }
.dialog-close { background: var(--grey100); color: var(--grey800); }
button, a { transition-timing-function: var(--ease-out); }
.primary-button, .secondary-button, .search-submit, .saved-nav { transition: transform .6s var(--bounce), background-color .2s; }
.primary-button:active, .secondary-button:active, .saved-nav:active, .search-submit:active { transform: scale(.96); transition-duration: .1s; }
@media (hover:hover) and (pointer:fine) {
  .brand:hover { transform: rotate(-3deg) scale(1.03); transition: transform .6s var(--bounce); }
  .tool-home-card:hover { transform: translateY(-7px); box-shadow: var(--shadow-m); }
}
@media (max-width:1050px) {
  .hero { padding: 40px 36px 28px; }
  .hero-top { grid-template-columns: 1.2fr 1fr; }
  .word-play { transform: scale(.85); transform-origin: center; }
  .hero h1 { font-size: 54px; }
  .tool-home-card { padding: 24px; }
  .tool-home-card h3 { font-size: 22px; }
}
@media (max-width:760px) {
  .header { gap: 14px; }
  .main-nav a { padding-inline: 10px; font-size: 13px; }
  .saved-nav { padding-inline: 12px; }
  .hero-shell { padding-inline: 16px; }
  .hero { padding: 32px 28px 24px; }
  .hero-top { grid-template-columns: minmax(0,1fr) 210px; gap: 0; padding-bottom: 30px; }
  .hero h1 { font-size: 43px; }
  .hero-description { font-size: 14px; }
  .word-play { transform: scale(.67); transform-origin: 0 center; width: 300px; margin-left: -8px; }
  .search-field { min-height: 72px; padding-left: 18px; }
  .search-field input { font-size: 17px; }
  .search-submit { min-height: 52px; font-size: 14px; gap: 10px; padding-left: 18px; }
  .search-submit .icon { width: 17px; height: 17px; padding: 9px; }
  .content-wrap { padding-top: 44px; }
  .section-heading .text-link { font-size: 12px; }
  .tool-home-card { border-radius: 24px; }
  .studio-intro { padding-top: 30px; }
}
@media (max-width:540px) {
  :root { --gutter: 20px; }
  html { scroll-padding-top: 120px; }
  .header { height: auto; min-height: 108px; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding-top: 14px; padding-bottom: 8px; }
  .brand { font-size: 25px; }
  .brand-icon { width: 32px; height: 32px; }
  .saved-nav { grid-column: 2; grid-row: 1; min-height: 40px; }
  .main-nav { display: flex; grid-row: 2; grid-column: 1/-1; justify-content: center; margin: 0; gap: 6px; }
  .header .main-nav a { display: block; font-size: 13px; min-height: 40px; padding: 8px 12px; white-space: nowrap; }
  .hero-shell { padding: 4px 12px 0; }
  .hero { border-radius: 26px; padding: 28px 20px 22px; }
  .hero-top { display: block; padding-bottom: 28px; min-height: 0; }
  .hero-copy .eyebrow { font-size: 12px; padding: 7px 12px; letter-spacing: 0; }
  .hero h1 { font-size: clamp(36px,10.5vw,51px); margin: 22px 0 16px; letter-spacing: -.045em; }
  .hero-description { font-size: 14px; line-height: 1.7; max-width: none; padding-right: 0; }
  .word-play { display: none; }
  .search-modes { gap: 2px; justify-content: space-between; margin-bottom: 12px; }
  .search-modes span { padding: 10px 12px; font-size: 13px; }
  .search-field, .compact .search-field { gap: 10px; min-height: 66px; padding: 7px 8px 7px 14px; border-radius: 18px; }
  .search-field > .icon { display: none; }
  .search-field input, .compact .search-field input { font-size: 17px; }
  .search-submit, .compact .search-submit { min-height: 44px; width: 44px; height: 44px; padding: 0; justify-content: center; }
  .search-submit > span { display: none; }
  .search-submit .icon { padding: 12px; width: 18px; height: 18px; }
  .search-foot { margin-top: 13px; }
  .suggested-words { gap: 14px; font-size: 12px; }
  .suggested-words > span { display: none; }
  .compact .hero { padding: 16px 16px 13px; border-radius: 22px; }
  .compact .search-modes { gap: 2px; }
  .compact .search-foot { margin-top: 6px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 16px; margin-bottom: 22px; }
  .section-heading h2 { font-size: 26px; margin-top: 9px; }
  .section-heading .text-link { font-size: 12px; min-height: 40px; }
  .tool-home { margin-bottom: 48px; }
  .tool-home-grid { gap: 14px; }
  .tool-home-card { padding: 24px; }
  .tool-home-card > .tool-symbol { width: 48px; height: 48px; font-size: 29px; border-radius: 16px; margin-bottom: 18px; }
  .tool-home-card h3 { font-size: 23px; }
  .tool-home-card p { font-size: 14px; }
  .discover-grid { grid-template-columns: 1fr; }
  .daily-card { padding: 24px; }
  .topic-card { min-height: 134px; padding: 24px; }
  .topic-card h3 { font-size: 20px; }
  .topic-card p { max-width: none; font-size: 13px; }
  .topic-overline { font-size: 11px; }
  .bottom-note { margin-top: 40px; }
  .studio-intro h1 { font-size: 30px; line-height: 1.3; }
  .studio-intro p:last-child { font-size: 14px; }
  .tool-tabs { margin-inline: -4px; padding: 6px; border-radius: 16px; }
  .tool-tabs a { padding-inline: 14px; }
  .entry-card, .paper-panel, .word-card { border-radius: 20px; }
}
@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
