/* /type, /type/<id> and /sky (scripts/type-sky.mjs). The card is drawn on a 1080 x 1350 sheet: --c is one of its pixels. */
.ty, .sk { padding-top: clamp(14px, 4vh, 44px); }
.ty-step[hidden], .ty [hidden], .sk-play[hidden] { display: none; }
.ty-step { animation: ty-in .32s cubic-bezier(.2, .9, .25, 1) both; }
.ty-intro, .sk { display: grid; justify-items: center; gap: clamp(22px, 4vh, 36px); text-align: center; }
.ty-say { max-width: 640px; }
.ty-say h1 { font-size: clamp(34px, 5vw, 60px); line-height: 1.05; font-weight: 600; letter-spacing: -.034em; text-wrap: balance; }
.ty-say .lead { text-wrap: balance; }
.ty .btn { border: 0; font-family: inherit; cursor: pointer; }
.ty-go { margin-top: 22px; min-width: 230px; }
.ty-small { text-wrap: balance; margin-top: 14px; font-size: 15px; line-height: 1.4; color: var(--ink-2); }
.ty :focus-visible, .sk :focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }
.ty h2:focus { outline: none; }

.tc { container-type: inline-size; position: relative; width: 100%; aspect-ratio: 1080 / 1350; border-radius: 4.1%/3.3%; overflow: hidden; color: #fff; background: #12206a center / cover no-repeat; box-shadow: var(--shadow-pop); text-align: left; }
.tc::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(12 22 84 / .26) 0%, rgb(12 22 84 / 0) 20%, rgb(20 32 120 / 0) 43%, rgb(18 28 112 / .46) 56%, rgb(10 18 78 / .78) 69%, rgb(6 10 48 / .92) 100%); }
.tc > * { --c: calc(100cqw / 1080); position: absolute; }
.tc p { margin: 0; }
.tc-top { left: calc(var(--c) * 70); top: calc(var(--c) * 56); display: flex; align-items: center; gap: calc(var(--c) * 20); font-size: calc(var(--c) * 36); line-height: 1; font-weight: 650; }
.tc-top svg { box-sizing: border-box; width: calc(var(--c) * 72); height: calc(var(--c) * 72); padding: calc(var(--c) * 7.7); border-radius: 26%; background: #fff; box-shadow: 0 calc(var(--c) * 5) calc(var(--c) * 18) rgb(6 10 44 / .28); }
.tc-art { left: calc(var(--c) * 90); top: calc(var(--c) * 150); width: calc(var(--c) * 900); height: calc(var(--c) * 640); max-width: none; }
.tc-bot { left: calc(var(--c) * 70); right: calc(var(--c) * 70); bottom: calc(var(--c) * 64); }
.tc-k { font-size: calc(var(--c) * 36); line-height: 1.2; font-weight: 600; opacity: .92; }
.tc-n { padding-top: calc(var(--c) * 8); font-size: calc(var(--c) * 106); line-height: 1.04; font-weight: 700; letter-spacing: -.035em; overflow-wrap: anywhere; }
.tc-l { padding-top: calc(var(--c) * 20); font-size: calc(var(--c) * 42); line-height: 1.28; font-weight: 500; }
.tc-ft { margin-top: calc(var(--c) * 40); padding-top: calc(var(--c) * 28); border-top: max(1px, calc(var(--c) * 2)) solid rgb(255 255 255 / .28); font-size: calc(var(--c) * 34); line-height: 1.2; font-weight: 500; display: flex; justify-content: space-between; gap: calc(var(--c) * 20); }
html:is(:lang(th), :lang(hi)) .tc-n { line-height: 1.3; letter-spacing: 0; font-size: calc(var(--c) * 90); }
html:is(:lang(ja), :lang(ko), :lang(zh)) .tc-n { line-height: 1.15; letter-spacing: 0; font-size: calc(var(--c) * 92); word-break: keep-all; }
.sky-dawn { background-image: url(/assets/type/sky-dawn-v1.webp); }
.sky-midday { background-image: url(/assets/type/sky-midday-v1.webp); }
.sky-golden { background-image: url(/assets/type/sky-golden-v1.webp); }
.sky-moon { background-image: url(/assets/type/sky-moon-v1.webp); }
.sky-morning { background-image: url(/assets/type/sky-morning-v1.webp); }
.sky-dusk { background-image: url(/assets/type/sky-dusk-v1.webp); }
.sky-sunset { background-image: url(/assets/type/sky-sunset-v1.webp); }
.sky-sunrise { background-image: url(/assets/type/sky-sunrise-v1.webp); }

.ty-one { width: min(340px, 78vw, 48svh); margin-inline: auto; }
.ty-fan { position: relative; width: min(290px, 58vw, 42svh); margin-top: 8px; }
.ty-fan .tc { position: absolute; inset: 0; width: 100%; transform: translateX(-24%) rotate(-8deg) scale(.88); }
.ty-fan .tc:nth-child(2) { transform: translateX(24%) rotate(8deg) scale(.88); }
.ty-fan .tc:nth-child(3) { position: relative; transform: none; }

.ty-q { width: min(520px, 100%); min-height: 420px; margin: clamp(8px, 5vh, 56px) auto 0; }
.ty-count { font-size: 15px; font-weight: 600; color: var(--ink-2); text-align: center; }
.ty-q h2 { margin: 8px 0 0; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; font-weight: 600; letter-spacing: -.03em; text-align: center; text-wrap: balance; }
.ty-answers { margin-top: 24px; display: grid; gap: 10px; }
.ty-opt { min-height: 60px; padding: 12px 22px; border: 1px solid rgb(16 20 42 / .14); border-radius: 18px; background: #fff; color: var(--ink); font: inherit; font-size: 18px; font-weight: 550; text-align: left; cursor: pointer; box-shadow: var(--shadow-soft); transition: border-color .15s, transform .15s; touch-action: manipulation; }
.ty-opt:hover { border-color: var(--cobalt); }
.ty-opt:active { transform: scale(.985); background: #eef1fe; }
.ty-back { display: block; min-height: 44px; margin: 14px auto 0; padding: 0 18px; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 16px; font-weight: 550; cursor: pointer; }
.ty-back:hover { color: var(--ink); }
.ty-result .ty-one { animation: ty-deal .5s cubic-bezier(.2, .9, .25, 1.06) both; }
.ty-do { margin-top: 24px; text-align: center; }
.ty-do .btn { min-width: 230px; }
.ty-do .ty-back { margin-top: 6px; }
.ty-said { min-height: 1.5em; font-size: 15px; color: var(--ink-2); overflow-wrap: anywhere; }
.ty-said:empty { min-height: 0; }

.ty-get { margin: clamp(26px, 6vh, 64px) auto clamp(56px, 9vh, 92px); max-width: 640px; text-align: center; }
.ty-real { font-size: clamp(20px, 2.2vw, 24px); line-height: 1.25; font-weight: 600; letter-spacing: -.02em; text-wrap: balance; }

.sk-card { width: min(660px, 100%); padding: 2.8% 2.8% 0; border-radius: 12px; background: #fffdf8; box-shadow: var(--shadow-pop); text-align: left; }
.sk-sky { container-type: inline-size; position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 6px; background: #3a5cc0; }
.sk-sky video { width: 100%; height: 100%; object-fit: cover; display: block; }
.sk-stamp { position: absolute; right: 3%; top: 4.6%; width: 14.5%; filter: drop-shadow(0 2px 5px rgb(8 14 60 / .3)); }
.sk-mark { position: absolute; right: 12%; top: 8.5%; width: 25%; opacity: .86; }
.sk-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); min-height: 48px; padding: 0 24px; border: 0; border-radius: 99px; background: rgb(8 14 50 / .72); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.sk-cap { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 14px 6px 16px; color: #10142a; }
.sk-cap b { display: block; font-size: clamp(17px, 2.6vw, 23px); line-height: 1.2; letter-spacing: -.015em; }
.sk-cap span { display: block; font-size: 14px; line-height: 1.35; color: #5a6180; }
.sk-me { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.sk-me svg { width: 24px; height: 24px; }
@media (max-width: 420px) { .sk-cap { flex-wrap: wrap; } }

@keyframes ty-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes ty-deal { from { opacity: 0; transform: translateY(30px) rotate(-4deg) scale(.94); } }
@media (prefers-reduced-motion: reduce) { .ty-step, .ty-result .ty-one { animation: none; } .ty-opt { transition: none; } }

@media (min-width: 900px) {
  .ty-intro { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; min-height: 520px; text-align: left; }
  .ty-intro .ty-fan { justify-self: center; }
  .ty-intro .ty-one, .ty-intro .ty-fan { width: min(350px, 52svh); }
  .sk { gap: 30px; }
}
