/* 사주돌 customer site: home, categories and 내 풀이. One column (a phone's width, centred on wider screens).
   Colours, sizes and the page basics are in tokens.css, loaded first.

   The look is ink on warm paper, like a printed list of readings: the brush logo, a product's name in Nanum
   Myeongjo over Wanted Sans, flat sections parted by hairlines and soft bands, small corners, and the pictures
   doing the colour. What can be tapped or bought is marked by weight and the ink fill (tokens.css --key);
   the five elements keep their own quiet colours for the 일진. */
:root {
  --display: "Nanum Myeongjo", "AppleMyungjo", "Noto Serif CJK KR", "Noto Serif KR", serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --rule: #d5cec2; /* a line a little stronger than --line: outlined buttons, the caret of a table row */
  --el-wood: #4a7a58;
  --el-fire: #b9584b;
  --el-earth: #a07c45;
  --el-metal: #7f8a91;
  --el-water: #2d4864;
}
@media (prefers-color-scheme: dark) {
  :root {
    --rule: #3d362e;
    --el-wood: #7fb48c;
    --el-fire: #e08a7c;
    --el-earth: #d2ad6f;
    --el-metal: #b3bdc3;
    --el-water: #8fb2d6;
  }
}

.app {
  position: relative;
  max-width: var(--col);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--surface);
  padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom));
}
@media (min-width: 560px) {
  .app { box-shadow: 0 0 0 1px var(--line), 0 40px 90px -50px rgba(34, 24, 14, .45); }
}
.skip {
  position: absolute; z-index: 100; top: 8px; left: 8px; padding: 10px 14px; border-radius: 6px;
  background: var(--ink); color: var(--surface); font-weight: 650; transform: translateY(-160%);
}
.skip:focus { transform: none; }

/* ---- header and tabs -------------------------------------------------------------------------- */
.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--top-h); padding: 0 8px 0 12px;
  background: var(--surface);
}
.is-scrolled .top:not(:has(+ .tabs)) { box-shadow: 0 1px 0 var(--line); }
/* the brush logo (web/_logo.html): 40px tall in the header, smaller in the menu and the footer */
.brand { display: inline-flex; align-items: center; }
.brand__logo { display: block; }
.brand__logo img { display: block; width: auto; height: 40px; }
.top__tools { display: flex; gap: 2px; }

/* categories as words on a line: the current one is heavier and underlined in ink */
.tabs { position: sticky; top: var(--top-h); z-index: 29; background: var(--surface); border-bottom: 1px solid var(--line); }
.tabs__track { display: flex; gap: 20px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.tabs__track::-webkit-scrollbar { display: none; }
.tabs__tab {
  flex: none; padding: 9px 0 11px; color: var(--ink-3); font-size: 15px; font-weight: 600; letter-spacing: -0.02em;
  transition: color .15s;
}
.tabs__tab:active { color: var(--ink); }
.tabs__tab.is-on { color: var(--ink); font-weight: 760; box-shadow: inset 0 -2px 0 var(--ink); }

.main { padding-bottom: 8px; }

/* ---- covers: the first row, one tall picture at a time from edge to edge, with a count of where it is ---- */
.covers { position: relative; }
.covers__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.covers__track::-webkit-scrollbar { display: none; }
.cover {
  position: relative; flex: 0 0 100%; height: clamp(400px, 115vw, 500px); overflow: hidden; isolation: isolate;
  background: var(--key-tint); color: #fff; scroll-snap-align: start;
}
.cover__media {
  position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%;
  transform: scale(1.04); transition: transform 6s linear;
}
.cover.is-active .cover__media { transform: none; }
.cover__media--blank { background: var(--key-tint); }
.cover__shade { position: absolute; inset: 44% 0 0; z-index: -1; background: linear-gradient(180deg, transparent, rgba(22, 14, 9, .86) 78%); }
.cover__body { position: absolute; left: 18px; right: 18px; bottom: 20px; display: grid; justify-items: start; }
.cover__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
/* the row's name on a slip of paper (the same in the dark: it sits on the picture), a number first when ranked */
.cover__tag {
  display: inline-flex; align-items: center; height: 21px; padding: 1px 7px 0; border-radius: 2px;
  background: #faf8f4; color: #1a1613; font-size: 11.5px; font-weight: 760; letter-spacing: -0.01em;
}
.cover__tag b { margin-right: 5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cover__tags .flag { height: 21px; background: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .62); color: #fff; }
.cover__name {
  margin-top: 9px; font-family: var(--display); font-size: 28px; font-weight: 800; line-height: 1.32; letter-spacing: -0.045em;
  text-wrap: balance;
}
.cover__line {
  margin-top: 7px; font-size: 14px; line-height: 1.5; opacity: .86;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.covers__count {
  position: absolute; top: 14px; right: 14px; margin: 0; padding: 3px 8px; border-radius: 3px; pointer-events: none;
  background: rgba(22, 14, 9, .5); color: #fff; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
}

/* ---- this browser's readings on the home: one line each, right where the visitor left off ---------- */
.resume { border-bottom: 1px solid var(--line); }
.sect + .resume { border-top: 8px solid var(--soft); }
.resume__title { margin: 0; padding: 13px 16px 3px; color: var(--ink-3); font-size: 12.5px; font-weight: 650; }
.resume__sub { margin: 0; padding: 0 16px 3px; color: var(--ink-3); font-size: 12.5px; }
.resume__list { list-style: none; margin: 0; padding: 0 0 4px; }
.resume__item { display: flex; align-items: center; gap: 10px; padding: 8px 16px; font-size: 14px; }
.resume__item:active { background: var(--soft); }
.resume__item img, .resume__blank { flex: none; width: 34px; height: 34px; border-radius: var(--r-xs); object-fit: cover; background: var(--soft); }
.resume__item b { min-width: 0; font-weight: 720; letter-spacing: -0.03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resume__item span { flex: none; color: var(--ink-3); font-size: 13px; }
.resume__item .ph { flex: none; margin-left: auto; color: var(--ink-3); font-size: 14px; }

/* ---- sections: flat, a soft band between one and the next -------------------------------------- */
.sect { padding: 26px 0 28px; }
.sect + .sect { border-top: 8px solid var(--soft); }
.sect--page { padding: 22px 16px 10px; }
.sect--banner { padding: 20px 16px; }
.sect__head { padding: 0 16px 13px; }
.sect--page .sect__head { padding: 0 0 18px; }
.sect__title { margin: 0; font-size: 19px; font-weight: 800; line-height: 1.35; letter-spacing: -0.045em; text-wrap: balance; }
.sect__title--page { font-family: var(--display); font-size: 25px; letter-spacing: -0.04em; }
.sect__count { margin-left: 6px; color: var(--ink-3); font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }
.sect__sub { margin: 2px 0 0; color: var(--ink-3); font-size: 13px; }
.sect--page .sect__sub { margin-top: 5px; font-size: 14px; }
/* a home row's head: the title (and how many) on the left, '전체 보기' on its baseline at the right edge */
.sect__head--split { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sect__head--split > div { min-width: 0; }
.sect__more { flex: none; display: inline-flex; align-items: center; gap: 1px; color: var(--ink-3); font-size: 13px; font-weight: 550; white-space: nowrap; }
.sect__more .ph { font-size: 12px; }
@media (hover: hover) { .sect__more:hover { color: var(--ink); } }

/* product posters: a rail to push sideways, or two to a line */
.rail { display: flex; gap: 10px; padding: 0 16px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: 16px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 10px; padding: 0 16px; }
.sect--page .grid { padding: 0; }

.card { display: block; min-width: 0; color: inherit; }
.rail .card { flex: 0 0 132px; }
.card__pic { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: var(--r-xs); background: var(--soft); transition: opacity .15s; }
.card:active .card__pic { opacity: .82; }
.card__pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 10%; }
.card__blank { position: absolute; inset: 0; background: var(--key-tint); }
.card__pic .flag { position: absolute; top: 6px; left: 6px; }
.card__rank {
  position: absolute; left: 8px; bottom: 5px; color: #fff; font-family: var(--display); font-size: 32px; font-weight: 800; line-height: 1;
  letter-spacing: -0.04em; text-shadow: 0 1px 10px rgba(22, 14, 9, .6);
}
.card__name {
  margin-top: 9px; font-size: 14.5px; font-weight: 720; line-height: 1.35; letter-spacing: -0.035em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__line { display: block; margin-top: 2px; color: var(--ink-3); font-size: 12.5px; line-height: 1.45; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid .card__name { font-size: 15px; }
.grid .card__line { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 13px; white-space: normal; }

.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 5px; margin-top: 5px; font-variant-numeric: tabular-nums; }
.price__rate { color: var(--danger); font-weight: 760; font-size: 14.5px; }
.price__now { font-weight: 760; font-size: 14.5px; }
.price__was { color: var(--ink-3); font-size: 12px; }

/* a product's badge: a small square slip, not a pill */
.flag {
  display: inline-flex; align-items: center; height: 19px; padding: 1px 6px 0; border-radius: 2px;
  background: rgba(22, 14, 9, .8); color: #fff; font-size: 10.5px; font-weight: 760; letter-spacing: .04em;
}
.flag--new { background: #faf8f4; color: #1a1613; }

/* products as a list, one to a line (세로 목록): a number first when the row is ranked, the first five and
   the rest folded under '더 보기' */
.items { list-style: none; margin: 0; padding: 0; }
.item { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 13px; align-items: center; padding: 9px 16px; }
.item:active { background: var(--soft); }
.items--ranked .item { grid-template-columns: 26px 68px minmax(0, 1fr); }
.item__num { color: var(--ink-3); font-family: var(--display); font-size: 23px; font-weight: 800; line-height: 1; text-align: center; font-variant-numeric: tabular-nums; }
.item__num.is-top { color: var(--ink); }
.item__pic { position: relative; display: block; width: 68px; height: 68px; overflow: hidden; border-radius: var(--r-xs); background: var(--soft); }
/* the card's tall poster cut square: drawn a little larger, about the face, so a small square still shows who it is */
.item__pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; transform: scale(1.3); transform-origin: 50% 24%; }
.item__text { display: grid; gap: 1px; min-width: 0; }
.item__name { font-size: 15.5px; font-weight: 720; letter-spacing: -0.035em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item__line { color: var(--ink-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item__meta { margin-top: 1px; color: var(--ink-3); font-size: 12px; }
.more > summary {
  display: flex; align-items: center; justify-content: center; gap: 4px; height: 46px; margin: 12px 16px 0;
  border: 1px solid var(--rule); border-radius: 6px; color: var(--ink-2); font-size: 14px; font-weight: 650;
  list-style: none; cursor: pointer;
}
.more > summary::-webkit-details-marker { display: none; }
.more > summary:active { background: var(--soft); }
.more[open] > summary { display: none; }

/* 고민별로 찾기: the categories as a table of two columns, how many readings each holds */
.topics__table { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; margin: 0 16px; border-top: 1.5px solid var(--ink); }
.topics__table a {
  display: flex; align-items: baseline; gap: 7px; min-width: 0; padding: 15px 2px 14px; border-bottom: 1px solid var(--line);
  font-size: 16px; font-weight: 720; letter-spacing: -0.03em;
}
.topics__table a:last-child:nth-child(odd) { grid-column: 1 / -1; }
.topics__table a:active { background: var(--soft); }
.topics__table b { min-width: 0; font-weight: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topics__table small { flex: none; color: var(--ink-3); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.topics__table .ph { flex: none; align-self: center; margin-left: auto; color: var(--rule); font-size: 14px; }

/* ---- 오늘의 일진: the day's two characters set large, its name, a line about it and its two elements ---- */
.today { padding: 24px 16px 26px; }
.today__date { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 0 0 12px; font-size: 13px; font-weight: 760; }
.today__date span { color: var(--ink-3); font-weight: 500; }
.today__main { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--line); }
.today__hanja { flex: none; font-family: var(--display); font-size: 40px; font-weight: 800; line-height: 1; letter-spacing: .02em; }
.today__name { margin: 0; font-family: var(--display); font-size: 21px; font-weight: 800; line-height: 1.3; letter-spacing: -0.04em; }
.today__pillar { margin: 3px 0 0; color: var(--ink-3); font-size: 13px; }
.today__line { margin: 14px 0; max-width: 36ch; color: var(--ink-2); font-size: 15px; line-height: 1.62; text-wrap: pretty; }
.today__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.today__elements { display: flex; gap: 14px; color: var(--ink-2); font-size: 13px; font-weight: 650; }
.today__element b { margin-right: 4px; color: var(--el, var(--ink)); font-family: var(--display); font-weight: 800; }
.today__element--wood { --el: var(--el-wood); }
.today__element--fire { --el: var(--el-fire); }
.today__element--earth { --el: var(--el-earth); }
.today__element--metal { --el: var(--el-metal); }
.today__element--water { --el: var(--el-water); }
.today__cta { display: inline-flex; align-items: center; gap: 3px; padding: 6px 0; font-size: 14px; font-weight: 720; }
.today__cta .ph { font-size: 13px; transition: transform .2s var(--ease-out); }
@media (hover: hover) { .today__cta:hover .ph { transform: translateX(3px); } }

/* reviews: they roll by on their own; a finger or the pointer holds them */
.voices__viewport { overflow-x: auto; padding: 2px 0 2px; scrollbar-width: none; }
.voices__viewport::-webkit-scrollbar { display: none; }
.voices__viewport.is-rolling {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.voices__track { list-style: none; display: flex; gap: 10px; width: max-content; margin: 0; padding: 0 16px; }
.voices__viewport.is-rolling .voices__track { gap: 0; padding: 0; animation: voices-roll var(--roll, 48s) linear infinite; }
.voices__viewport.is-rolling .voice { margin-right: 10px; } /* gaps inside the loop, so half its width is one full set */
.voices__viewport.is-rolling:hover .voices__track, .voices__viewport.is-held .voices__track { animation-play-state: paused; }
@keyframes voices-roll { to { transform: translateX(-50%); } }
.voice { flex: 0 0 252px; }
.voice a {
  height: 100%; display: grid; gap: 8px; align-content: start; padding: 15px 15px 14px; border-radius: var(--r-sm);
  background: var(--raised); box-shadow: inset 0 0 0 1px var(--line);
}
.voice__stars { display: inline-flex; gap: 1px; color: var(--ink); font-size: 12px; }
.voice__stars .is-off { color: var(--rule); }
.voice__body { font-size: 14.5px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 4.8em; }
.voice__who { font-size: 12px; color: var(--ink-3); }
.voice__who b { font-weight: 650; color: var(--ink-2); }
.voice__product { font-size: 12px; font-weight: 650; color: var(--ink-2); }

.banner { display: block; overflow: hidden; border-radius: var(--r-sm); }
.banner img { width: 100%; }

/* how 사주돌 reads a chart: three short paragraphs, each led by a bold line */
.how { padding: 28px 16px 30px; }
.how__eyebrow { margin: 0 0 6px; color: var(--ink-3); font-size: 13px; font-weight: 650; }
.how__title { margin: 0 0 6px; font-family: var(--display); font-size: 21px; font-weight: 800; line-height: 1.4; letter-spacing: -0.04em; text-wrap: balance; }
.how__steps { list-style: none; margin: 0; padding: 0; }
.how__steps li { padding: 13px 0; border-bottom: 1px solid var(--line); }
.how__steps b { display: block; margin-bottom: 1px; font-size: 15px; font-weight: 720; letter-spacing: -0.02em; }
.how__steps p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.6; text-wrap: pretty; }
.how__cta {
  display: flex; align-items: center; justify-content: center; gap: 5px; height: 48px; margin-top: 18px; border-radius: 6px;
  background: var(--key); color: var(--on-key); font-size: 15px; font-weight: 700; transition: opacity .15s;
}
.how__cta:active { opacity: .86; }

/* sections come in as they scroll into view (web.js); without scripts, or with less motion asked for, they just show */
.js .reveal > * { opacity: 0; transform: translateY(10px); transition: opacity .45s var(--ease-out), transform .45s var(--ease-out); animation: reveal-anyway 0s 2s forwards; }
.js .reveal.is-in > * { opacity: 1; transform: none; animation: none; }
@keyframes reveal-anyway { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .js .reveal > * { opacity: 1; transform: none; transition: none; } }

/* empty states, notices, buttons, fields */
.empty { display: grid; justify-items: center; gap: 10px; padding: 48px 16px; text-align: center; color: var(--ink-3); }
.empty .ph { font-size: 30px; color: var(--ink-3); }
.empty p { margin: 0; }
.notice { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--soft); font-size: 14px; color: var(--ink-2); }
.notice--ok { background: var(--key-tint); color: var(--ink); }
.notice--error { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); color: var(--danger); }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 46px; padding: 0 18px;
  border: 0; border-radius: var(--r-sm); background: var(--soft); font-size: 15px; font-weight: 650; white-space: nowrap; cursor: pointer;
  transition: transform .12s;
}
.button:active { transform: scale(.98); }
.button--primary { background: var(--key); color: var(--on-key); }
.button:disabled { opacity: .5; cursor: default; }
.text-button { margin-top: 18px; padding: 6px 0; border: 0; background: none; color: var(--ink-3); font-size: 13px; text-decoration: underline; cursor: pointer; }

/* 탈퇴 / 내 풀이와 정보 지우기 (leave.html): what goes and what stays, a box to tick, then the red button */
.leave__lists { display: grid; gap: 12px; margin: 4px 0 22px; }
.leave__list { padding: 14px 16px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--danger) 7%, var(--surface)); }
.leave__list--kept { background: var(--soft); }
.leave__title { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--ink); }
.leave__title .ph { font-size: 16px; color: var(--danger); }
.leave__list--kept .leave__title .ph { color: var(--ink-3); }
.leave__list ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.leave__form { display: grid; gap: 14px; justify-items: start; }
.leave__agree { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 1.5; color: var(--ink); cursor: pointer; }
.leave__agree input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--danger); flex: none; }
.leave__go { width: 100%; background: var(--danger); color: #fff; }
.me__leave { display: block; margin-top: 8px; }

/* 내 풀이: this browser's readings as a table of rows */
.continue { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.continue__item { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.continue__item:active { background: var(--soft); }
.continue__item img, .continue__blank { flex: none; width: 52px; height: 52px; border-radius: var(--r-xs); object-fit: cover; background: var(--soft); }
.continue__text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.continue__text b { font-size: 15.5px; font-weight: 720; letter-spacing: -0.03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.continue__text span { font-size: 13px; color: var(--ink-3); }
.continue__item .ph { color: var(--ink-3); font-size: 16px; }

.restore { padding: 30px 16px 10px; border-top: 8px solid var(--soft); margin-top: 18px; }
.restore .sect__head { padding: 0 0 14px; }
.phone-form { display: grid; gap: 12px; }
/* 본인 확인 (reading_gate.html): a reading's address on a browser not yet known as its owner */
.gate { border-top: 0; margin-top: 0; }
.gate__product { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.gate__product img { flex: none; width: 40px; height: 40px; border-radius: var(--r-xs); object-fit: cover; }
.gate .kakao { margin: 0 0 4px; }
.gate__or { display: flex; align-items: center; gap: 10px; margin: 14px 0 12px; color: var(--ink-3); font-size: 13px; }
.gate__or::before, .gate__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; } /* the row's input shrinks, its button stays whole */
.field[hidden] { display: none; }
.field__label { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.field__row { display: flex; gap: 8px; }
.field__input {
  flex: 1; min-width: 0; height: 46px; padding: 0 14px; border: 1px solid var(--rule); border-radius: var(--r-sm);
  background: var(--raised); color: var(--ink); font: inherit; font-size: 16px; font-variant-numeric: tabular-nums;
}
.field__input:focus { outline: none; border-color: var(--key); box-shadow: 0 0 0 3px var(--key-tint); }
.field__help { margin: 0; min-height: 1.2em; font-size: 13px; color: var(--ink-3); }
.field__help.is-error { color: var(--danger); }
.field__help.is-ok { color: var(--ink); font-weight: 600; }
.field__help a { color: var(--ink); font-weight: 650; text-decoration: underline; text-underline-offset: 2px; }
/* Kakao Login button: Kakao's own colours, as its design guide asks */
.kakao {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; margin-top: 16px;
  border-radius: var(--r-sm); background: #fee500; color: rgba(0, 0, 0, .85); font-weight: 650;
}

.product-soon { display: grid; gap: 10px; justify-items: start; }
.product-soon__poster { width: 100%; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--r-sm); background: var(--soft); margin-bottom: 8px; }
.product-soon__poster img, .product-soon__poster video { width: 100%; height: 100%; object-fit: cover; }

/* 내 풀이: 이용권 from a package, each a way into its product */
.credits { margin: 0 0 22px; }
.credits__title { margin: 0 0 8px; font-size: 15px; font-weight: 720; }
.credits__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.credits__item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; padding: 12px 14px;
  border-radius: var(--r-sm); background: var(--key-tint); color: var(--ink);
}
.credits__item b { font-size: 15px; font-weight: 720; }
.credits__item span { grid-column: 1; font-size: 13px; color: var(--ink-2); }
.credits__item .ph { grid-column: 2; grid-row: 1 / 3; font-size: 16px; color: var(--ink-3); }

/* the payment window came back without a finished payment */
.pay-result .empty { padding-top: 64px; }
.pay-result .sect__title { color: var(--ink); }
.pay-result__note { font-size: 13px; }

/* ---- footer, dock, drawer, sheet -------------------------------------------------------------- */
.foot { margin-top: 12px; padding: 28px 20px 38px; background: var(--soft); color: var(--ink-3); font-size: 12px; }
.foot__brand { margin: 0 0 8px -4px; }
.foot__brand .brand__logo img { height: 30px; }
.foot__tag { margin: 0 0 16px; max-width: 34ch; font-size: 13px; line-height: 1.55; color: var(--ink-2); }
.foot__links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 18px; font-size: 13px; font-weight: 650; color: var(--ink-2); }
.foot__links a { padding: 4px 0; }
.foot__info { margin: 0 0 12px; display: grid; gap: 3px; }
.foot__info div { display: flex; gap: 8px; }
.foot__info dt { flex: none; min-width: 92px; }
.foot__info dd { margin: 0; color: var(--ink-2); }
.foot__copy { margin: 0; }

.dock {
  position: fixed; z-index: 40; bottom: 0; left: 50%; transform: translateX(-50%);
  display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; max-width: var(--col);
  height: calc(var(--dock-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 95%, transparent); backdrop-filter: saturate(150%) blur(16px);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  border-top: 1px solid var(--line);
}
.dock__item { display: grid; place-items: center; align-content: center; gap: 2px; font-size: 11px; font-weight: 550; color: var(--ink-3); }
.dock__item .ph { font-size: 23px; transition: transform .2s var(--ease-out); }
.dock__item:active .ph { transform: scale(.9); }
.dock__item.is-on { color: var(--ink); font-weight: 720; }

.drawer[hidden], .sheet[hidden] { display: none; }
.drawer, .sheet { position: fixed; inset: 0; z-index: 60; }
.drawer__backdrop, .sheet__backdrop { position: absolute; inset: 0; background: rgba(22, 14, 9, .5); animation: fade .25s both; }
.drawer__panel {
  position: absolute; top: 0; bottom: 0; right: max(0px, calc(50% - var(--col) / 2)); width: min(320px, 86vw);
  padding: 0 20px 32px; overflow-y: auto; background: var(--surface); animation: slide-in .32s var(--ease-out) both;
}
.drawer__head { display: flex; align-items: center; justify-content: space-between; height: var(--top-h); margin: 0 -12px 0 -6px; }
.drawer__head .brand__logo img { height: 36px; }
.drawer__label { margin: 22px 0 6px; font-size: 12px; font-weight: 650; color: var(--ink-3); }
.drawer__list { list-style: none; margin: 0; padding: 0; }
.drawer__list a { display: block; padding: 11px 0; font-size: 16px; font-weight: 650; letter-spacing: -0.02em; }

.sheet__panel {
  position: absolute; left: 50%; bottom: 0; width: 100%; max-width: var(--col); transform: translateX(-50%);
  overflow: hidden; border-radius: var(--r) var(--r) 0 0; background: var(--surface);
  padding-bottom: env(safe-area-inset-bottom); animation: rise .45s var(--ease-out) both;
}
.sheet__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.sheet__track::-webkit-scrollbar { display: none; }
.sheet__item { position: relative; flex: 0 0 100%; display: block; aspect-ratio: 4 / 4.3; scroll-snap-align: center; }
.sheet__item img, .sheet__blank { display: block; width: 100%; height: 100%; object-fit: cover; }
.sheet__text {
  position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 4px; padding: 48px 20px 20px;
  background: linear-gradient(180deg, transparent, rgba(22, 14, 9, .84)); color: #fff;
}
.sheet__text small { font-size: 12px; font-weight: 700; opacity: .82; }
.sheet__text b { font-family: var(--display); font-size: 24px; font-weight: 800; line-height: 1.3; letter-spacing: -0.04em; }
.sheet__text span { font-size: 14px; opacity: .9; }
.sheet__actions { display: flex; justify-content: space-between; padding: 6px 8px; }
.sheet__actions button { padding: 12px; border: 0; background: none; font-size: 14px; color: var(--ink-3); cursor: pointer; }
.sheet__actions button:last-child { color: var(--ink); font-weight: 650; }

@keyframes fade { from { opacity: 0; } }
@keyframes slide-in { from { transform: translateX(100%); } }
@keyframes rise { from { transform: translate(-50%, 100%); } }

/* 이용약관 · 개인정보처리방침 · 환불 규정 (web/policy.html): long text set for reading on a phone */
.policy .sect__sub a, .policy__note a, .policy__versions a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.policy__note { margin: 0 0 14px; font-size: 13px; color: var(--ink-2); }
.policy__body { font-size: 14.5px; line-height: 1.75; color: var(--ink-2); word-break: keep-all; overflow-wrap: anywhere; }
.policy__body h2, .policy__body h3 { margin: 26px 0 8px; font-size: 16px; line-height: 1.45; color: var(--ink); scroll-margin-top: calc(var(--top-h) + 12px); }
.policy__body h2:first-child, .policy__body h3:first-child { margin-top: 4px; }
.policy__body p { margin: 0 0 10px; }
.policy__body ol, .policy__body ul { margin: 0 0 12px; padding-left: 20px; }
.policy__body li { margin: 3px 0; }
.policy__body li > ul, .policy__body li > ol { margin: 4px 0 0; }
.policy__body b { color: var(--ink); }
.policy__body a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.policy__body table { width: 100%; margin: 6px 0 16px; border-collapse: collapse; font-size: 13px; line-height: 1.55; display: block; overflow-x: auto; }
.policy__body th, .policy__body td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; min-width: 88px; }
.policy__body th { color: var(--ink); font-weight: 650; background: var(--soft); white-space: nowrap; }
.policy__versions { margin: 22px 0 8px; font-size: 12.5px; color: var(--ink-3); word-spacing: 4px; }
.foot__links--policy { margin-top: -10px; font-weight: 500; color: var(--ink-3); }
.foot__links--policy b { color: var(--ink-2); }
