/* recursos.uricortina.com — paper, ink and one warm yellow accent.
   Fonts are self-hosted: no request to Google from a page visited from the EU. */
@font-face { font-family: Inter; src: url(/assets/fonts/inter.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url(/assets/fonts/instrument-serif-italic.woff2) format('woff2'); font-style: italic; font-weight: 400; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url(/assets/fonts/jetbrains-mono.woff2) format('woff2'); font-weight: 100 800; font-display: swap; }

:root {
  --paper: #F5F0E6;
  --paper-2: #EFE8DA;
  --card: #FFFFFF;
  --ink: #15151B;
  --ink-2: #2B2B33;
  --muted: #5E5B66;      /* 6.0:1 on paper */
  --line: #E3DACA;
  --dark: #131419;
  --cyan: #FFD43A;       /* accent (warm yellow): only as a fill under ink text */
  --cyan-deep: #D9A400;
  --ok: #B9F5D0;
  --warn: #FFE9A8;
  --t-prompt: #FFEDB0;
  --t-guia: #FFDCCB;
  --t-web: #E2DCFF;
  --t-mio: #D3F1CF;
  --r: 22px;
  --sans: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--sans); font-feature-settings: 'ss01', 'cv11'; -webkit-font-smoothing: antialiased; }
body::before { /* paper grain, static and cheap */
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background-image: radial-gradient(rgba(21,21,27,.05) 1px, transparent 1px); background-size: 22px 22px; }
main, header, footer, section { position: relative; z-index: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.ic { width: 20px; height: 20px; flex: none; }
::selection { background: var(--cyan); color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 8px; }

/* ── icons draw themselves in */
.reveal .ic path, .reveal .ic circle, .reveal .ic rect,
.card .ic path, .card .ic circle, .card .ic rect { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .9s var(--ease) .25s; }
.reveal.in .ic path, .reveal.in .ic circle, .reveal.in .ic rect { stroke-dashoffset: 0; }

/* ── reveal on scroll (staggered by --i or order) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--d, 0) * 1ms); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ── top bar */
.top { position: sticky; top: 0; z-index: 20; background: rgba(245,240,230,.82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.top.scrolled { border-bottom-color: var(--line); }
.top-in { display: flex; align-items: center; gap: 12px; height: 66px; }
.me { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.ring { width: 44px; height: 44px; border-radius: 50%; padding: 2px; background: conic-gradient(from 200deg, var(--cyan), #FF8A4C, #8B7CFF, var(--cyan)); flex: none; }
.ring img { width: 100%; height: 100%; border-radius: 50%; border: 2px solid var(--paper); object-fit: cover; image-rendering: pixelated; background: #fff; }
.who b { display: block; font-size: 16px; line-height: 1.15; letter-spacing: -.01em; }
.who span { color: var(--muted); font-size: 13px; }
.back { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; font-size: 15px; text-decoration: none; padding: 9px 14px 9px 10px; margin-left: -10px; border-radius: 999px; transition: background .2s; }
.back:hover { background: var(--paper-2); }
.follow { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700; text-decoration: none; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; transition: transform .2s var(--ease), background .2s; }
.follow .ic { width: 17px; height: 17px; }
.follow:hover { transform: translateY(-1px); background: #000; }
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; }
.progress i { display: block; height: 100%; width: 100%; background: var(--cyan-deep); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.home .progress { display: none; }

/* ── type */
h1 { font: 800 clamp(38px, 6.4vw, 72px)/1.02 var(--sans); letter-spacing: -.035em; margin: 0 0 18px; }
h1 em, .foot-big em { font: italic 400 1.08em/1 var(--serif); letter-spacing: -.01em; position: relative; white-space: nowrap; padding: 0 .06em; }
h1 em::after, .foot-big em::after { content: ''; position: absolute; left: -.04em; right: -.04em; bottom: .08em; height: .34em; background: var(--cyan); z-index: -1; border-radius: 4px; transform: scaleX(0); transform-origin: 0 50%; animation: mark 1s var(--ease) .7s forwards; }
@keyframes mark { to { transform: scaleX(1); } }
h2 { font: 800 clamp(25px, 3.4vw, 32px)/1.15 var(--sans); letter-spacing: -.025em; margin: 52px 0 16px; }
h3 { font: 750 19px/1.25 var(--sans); letter-spacing: -.015em; margin: 0 0 6px; }
.lead { font-size: clamp(18px, 2vw, 21px); line-height: 1.5; color: var(--muted); margin: 0 0 8px; max-width: 34em; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font: 600 13px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; background: var(--card); border: 1px solid var(--line); padding: 9px 14px 9px 11px; border-radius: 999px; margin: 0 0 22px; }
.kicker .ic { width: 16px; height: 16px; color: var(--cyan-deep); }

/* ── home hero */
.hero { display: grid; grid-template-columns: 1fr 92px; grid-template-areas: 'tx tx' 'nums av'; column-gap: 12px; padding-top: 34px; padding-bottom: 10px; align-items: end; }
.hero-tx { grid-area: tx; }
.nums { grid-area: nums; display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 28px; align-self: end; }
.hero-av { grid-area: av; }
.nums div { display: flex; flex-direction: column; }
.nums b { font: 700 30px/1 var(--mono); letter-spacing: -.04em; }
.nums span { font-size: 13px; color: var(--muted); margin-top: 6px; }
.hero-av { position: relative; justify-self: end; width: 100%; }
.hero-av img { width: 100%; height: auto; image-rendering: auto; animation: idle 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
.hero-av .shadow { display: block; width: 70%; height: 14px; margin: -6px auto 0; background: radial-gradient(closest-side, rgba(21,21,27,.22), transparent); animation: shadow 3.2s ease-in-out infinite; }
@keyframes idle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes shadow { 0%, 100% { transform: scaleX(1); opacity: 1; } 50% { transform: scaleX(.82); opacity: .7; } }
.bubble { position: absolute; left: -96px; top: 18px; background: var(--card); border: 2px solid var(--ink); border-radius: 18px 18px 4px 18px; padding: 10px 14px 11px; box-shadow: 4px 4px 0 var(--ink); text-align: left; min-width: 128px; animation: pop .6s var(--ease) 1.1s both; }
.bubble-k { display: block; font: 600 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.bubble-w { font: 700 19px/1 var(--mono); letter-spacing: .02em; }
.bubble-w::after { content: ''; display: inline-block; width: 2px; height: 1em; background: var(--ink); margin-left: 3px; vertical-align: -2px; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.7) translateY(8px); } }

/* ── how it works */
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 30px; }
.how-step { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 14px; display: flex; flex-direction: column; gap: 2px; position: relative; }
.how-step b { font-size: 15px; line-height: 1.25; margin-top: 10px; }
.how-step span { font-size: 13px; color: var(--muted); line-height: 1.4; }
.how-ic { width: 26px; height: 26px; color: var(--ink); }
.how-step:not(:last-child)::after { content: ''; position: absolute; right: -9px; top: 50%; width: 8px; height: 2px; background: var(--line); }

/* ── finder */
.lib { margin-top: 44px; padding-bottom: 30px; }
.finder { position: sticky; top: 66px; z-index: 10; background: linear-gradient(var(--paper) 78%, rgba(245,240,230,0)); padding: 12px 0 18px; margin: 0 -2px; }
.search { display: flex; align-items: center; gap: 12px; background: var(--card); border: 2px solid var(--ink); border-radius: 18px; padding: 0 18px; box-shadow: 4px 4px 0 var(--ink); transition: box-shadow .2s, transform .2s; }
.search:focus-within { box-shadow: 6px 6px 0 var(--cyan-deep); transform: translate(-1px, -1px); }
.search .ic { width: 22px; height: 22px; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 600 18px/1 var(--sans); padding: 17px 0; color: var(--ink); }
.search input::placeholder { color: #8A8692; font-weight: 500; }
.chips { display: flex; gap: 8px; margin-top: 14px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 9px 14px; font-size: 14px; font-weight: 650; cursor: pointer; transition: background .2s, border-color .2s, transform .15s; white-space: nowrap; }
.chip i { font: normal 600 12px/1 var(--mono); color: var(--muted); margin-left: 4px; }
.chip:hover { transform: translateY(-1px); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.on i { color: #BDBAC6; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ── cards */
.grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.card { display: flex; flex-direction: column; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease), opacity .7s var(--ease); }
.card:hover { transform: translateY(-4px) rotate(-.3deg); box-shadow: 0 18px 40px -18px rgba(21,21,27,.35); }
.card[hidden] { display: none; }
.cover { position: relative; height: 128px; background: var(--tc); overflow: hidden; display: flex; align-items: flex-end; padding: 14px 18px; }
.t-prompt { --tc: var(--t-prompt); } .t-guia { --tc: var(--t-guia); } .t-web { --tc: var(--t-web); } .t-mio { --tc: var(--t-mio); }
.cover-word { font: italic 400 clamp(46px, 11vw, 60px)/.9 var(--serif); letter-spacing: -.02em; transition: transform .5s var(--ease); transform-origin: 0 100%; }
.card:hover .cover-word { transform: scale(1.04); }
.cover-ic { position: absolute; right: 16px; top: 14px; width: 30px; height: 30px; }
.cover-k { position: absolute; left: 18px; top: 14px; font: 600 11px/1 var(--mono); letter-spacing: .12em; opacity: .65; }
.cover::after { content: ''; position: absolute; right: -40px; bottom: -60px; width: 160px; height: 160px; border-radius: 50%; border: 1px solid rgba(21,21,27,.12); }
.card-tx { padding: 16px 18px 20px; }
.card h3 { margin-top: 10px; }
.card p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.meta time, .meta .num { font: 500 13px/1 var(--mono); color: var(--muted); }
.pill { font: 600 12px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; background: var(--tc, var(--paper-2)); padding: 6px 9px; border-radius: 999px; }
.card .pill { background: var(--paper); }

/* ── resource page */
.res-hero { padding-top: 26px; }
.res-cover { position: relative; background: var(--tc); border-radius: 26px; padding: 22px 24px 18px; margin-bottom: 22px; overflow: hidden; }
.res-cover::before { content: ''; position: absolute; right: -60px; top: -70px; width: 240px; height: 240px; border-radius: 50%; border: 1px solid rgba(21,21,27,.12); box-shadow: 0 0 0 36px rgba(255,255,255,.18); animation: orbit 14s linear infinite; }
@keyframes orbit { to { transform: rotate(360deg) translateX(6px); } }
.res-k { position: relative; display: flex; align-items: center; gap: 8px; font: 600 12px/1 var(--mono); letter-spacing: .12em; }
.res-k .ic { width: 18px; height: 18px; }
.res-word { position: relative; display: block; font: italic 400 clamp(64px, 16vw, 128px)/.95 var(--serif); letter-spacing: -.03em; margin-top: 26px; word-break: break-word; }
.res h1 { font-size: clamp(34px, 5.6vw, 54px); margin-top: 14px; }
.body > p { margin: 0 0 16px; }
.body > p b, .dots b, .note b { font-weight: 700; }
code { font: 500 .9em var(--mono); background: var(--paper-2); padding: 2px 6px; border-radius: 6px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 30px 0 20px; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 14px; }
.stats b { display: block; font: 700 clamp(22px, 4.6vw, 34px)/1 var(--mono); letter-spacing: -.04em; }
.stats span { display: block; font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.3; }

.steps { list-style: none; padding: 0; margin: 14px 0 22px; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 0 0 20px 58px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -3px; width: 38px; height: 38px; border-radius: 12px; background: var(--ink); color: #fff; font: 700 16px/38px var(--mono); text-align: center; }
.steps li:not(:last-child)::after { content: ''; position: absolute; left: 18px; top: 40px; bottom: 4px; width: 2px; background: repeating-linear-gradient(var(--line) 0 4px, transparent 4px 8px); }
.steps b { display: block; font-size: 17px; line-height: 1.3; margin-bottom: 2px; }
.steps span { color: var(--muted); font-size: 16px; }

.prompt { background: var(--dark); color: #F2F1EC; border-radius: var(--r); padding: 18px 18px 16px; margin: 18px 0 8px; box-shadow: 0 22px 44px -22px rgba(21,22,29,.55); }
.prompt-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 12px; }
.prompt .label { font: 600 12px/1.3 var(--mono); letter-spacing: .1em; color: #A9A8B6; }
.prompt .count { font: 500 11px/1 var(--mono); color: #8E8D9B; white-space: nowrap; }
.prompt-body { position: relative; }
.prompt pre { margin: 0; font: 15px/1.62 var(--mono); white-space: pre-wrap; word-break: break-word; }
.prompt.is-code pre { font-size: 13.5px; white-space: pre; overflow-x: auto; padding-bottom: 6px; }
.prompt.is-long pre { max-height: 270px; overflow: hidden; transition: max-height .6s var(--ease); }
.prompt.is-long.open pre { max-height: 6000px; }
.prompt.is-long .prompt-body::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 110px; background: linear-gradient(rgba(19,20,25,0), var(--dark) 85%); pointer-events: none; transition: opacity .3s; }
.prompt.is-long.open .prompt-body::after { opacity: 0; }
.expand { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); z-index: 2; background: #2A2B33; color: #fff; border: 1px solid #3A3B45; border-radius: 999px; padding: 8px 16px; font-size: 14px; font-weight: 650; cursor: pointer; }
.prompt.open .expand { position: static; transform: none; display: block; margin: 12px auto 0; }
.copy { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 16px; border: 0; border-radius: 16px; padding: 17px; font: 800 17px/1 var(--sans); cursor: pointer; background: var(--cyan); color: var(--ink); transition: transform .15s, background .25s; position: relative; overflow: hidden; }
.copy:hover { transform: translateY(-1px); }
.copy:active { transform: scale(.98); }
.copy.ok { background: var(--ok); }
.copy.ok .ic { animation: popin .4s var(--ease); }
@keyframes popin { from { transform: scale(.4) rotate(-20deg); } }
.hint { font-size: 15px; color: var(--muted); margin: 6px 4px 18px; }

.go { display: flex; align-items: center; gap: 14px; text-decoration: none; background: var(--card); border: 2px solid var(--ink); border-radius: 20px; padding: 16px 18px; margin: 18px 0; box-shadow: 4px 4px 0 var(--ink); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.go:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.go:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.go-ic { width: 44px; height: 44px; border-radius: 13px; background: var(--cyan); display: grid; place-items: center; flex: none; }
.go-tx { flex: 1; min-width: 0; }
.go-tx b { display: block; font-size: 17px; line-height: 1.25; }
.go-tx small { display: block; color: var(--muted); font: 500 13px/1.35 var(--mono); margin-top: 3px; overflow-wrap: anywhere; }
.go-arrow { transition: transform .25s var(--ease); }
.go:hover .go-arrow { transform: translateX(4px); }
.golist .go { margin: 12px 0; }

.note { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--cyan-deep); border-radius: 14px; padding: 14px 16px; margin: 16px 0; font-size: 16px; }
.note.warn { background: #FFF8E2; border-color: #F1DFA6; border-left-color: #E2A300; }
.dots { list-style: none; padding: 0; margin: 10px 0 20px; }
.dots li { position: relative; padding: 0 0 12px 26px; }
.dots li::before { content: ''; position: absolute; left: 4px; top: .62em; width: 9px; height: 9px; border-radius: 3px; background: var(--ink); transform: rotate(45deg); }
.source { font-size: 13px; color: var(--muted); margin-top: 26px; }

.tablewrap { overflow-x: auto; margin: 14px 0 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font: 600 12px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--paper); }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 650; }

.pair { margin: 24px 0; }
.pair-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pair-imgs div { position: relative; border-radius: 16px; overflow: hidden; background: var(--paper-2); }
.pair-imgs img { width: 100%; height: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.pair-imgs span { position: absolute; left: 8px; top: 8px; font: 600 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; background: rgba(255,255,255,.92); padding: 6px 8px; border-radius: 999px; }
.pair-imgs span.ok { background: var(--cyan); }
figcaption, .pet { font-size: 14px; color: var(--muted); margin-top: 8px; }
.variants { margin: 20px 0; }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 4px; background: var(--paper-2); border-radius: 16px; margin-bottom: 14px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 10px 12px; border-radius: 12px; font-size: 14px; font-weight: 650; cursor: pointer; white-space: nowrap; transition: background .2s; }
.tabs button[aria-selected="true"] { background: var(--card); box-shadow: 0 2px 8px rgba(21,21,27,.1); }
.tabpanel > p { margin: 10px 0; }

.phrases { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 10px; }
.phrases li { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.phrases .n { font: 700 15px/1 var(--mono); color: var(--muted); padding-top: 4px; }
.phrases q { display: block; font-weight: 700; line-height: 1.35; quotes: '«' '»'; }
.phrases p { margin: 6px 0 0; font-size: 15px; color: var(--muted); line-height: 1.45; }
.mini { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--cyan); display: grid; place-items: center; cursor: pointer; transition: transform .15s, background .2s; }
.mini .ic { width: 18px; height: 18px; }
.mini.ok { background: var(--ok); }
.mini:active { transform: scale(.92); }

.dice { margin: 16px 0 24px; display: grid; gap: 14px; }
.dice-grid { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 10px 6px; overflow-x: auto; }
.dice-grid .label { font: 600 12px/1 var(--mono); letter-spacing: .1em; color: var(--muted); margin: 0 6px 10px; }
.dice table { font-size: 13px; }
.dice th, .dice td { padding: 7px 6px; border: 0; text-align: center; font-weight: 500; white-space: nowrap; }
.dice thead th, .dice tbody th { font: 600 12px/1 var(--mono); color: var(--muted); background: none; }
.dice td { border-radius: 8px; transition: background .3s, transform .3s; }
.dice td.hit { background: var(--cyan); font-weight: 750; transform: scale(1.08); }
.dice-out { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.roll { display: inline-flex; align-items: center; gap: 10px; border: 2px solid var(--ink); background: var(--card); border-radius: 16px; padding: 13px 18px; font-weight: 750; cursor: pointer; box-shadow: 4px 4px 0 var(--ink); transition: transform .15s, box-shadow .15s; }
.roll:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.roll.spin .ic { animation: spin .6s var(--ease); }
@keyframes spin { to { transform: rotate(360deg); } }
.dice-res { margin: 0; font-size: 16px; }
.dice-res b { font-family: var(--mono); }
.dice-res .w { font: italic 400 26px/1 var(--serif); background: var(--cyan); padding: 0 6px; border-radius: 6px; }

.styles { display: grid; gap: 14px; margin: 24px 0; }
.style { display: grid; grid-template-columns: 112px 1fr; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 12px; align-items: start; }
.style img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 12px; background: var(--paper-2); position: sticky; top: 80px; }
.style .own { font: 13px/1.5 var(--mono); color: var(--ink-2); background: var(--paper); border-radius: 10px; padding: 10px 12px; margin: 12px 0 0; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.style .own b { font-family: var(--sans); }
.style .no { font: 600 12px/1 var(--mono); color: var(--muted); }
.style h3 { margin: 6px 0 4px; }
.style p { margin: 0; font-size: 14.5px; color: var(--muted); line-height: 1.45; }
.sw { display: flex; gap: 5px; margin: 10px 0 0; }
.sw i { width: 18px; height: 18px; border-radius: 6px; border: 1px solid rgba(21,21,27,.12); }
.style .copy { padding: 13px; font-size: 15px; margin-top: 12px; }
.style-tx { display: flex; flex-direction: column; min-width: 0; }

.dl { display: flex; align-items: center; gap: 14px; text-decoration: none; border: 1px dashed #BDB3A0; border-radius: 18px; padding: 16px 18px; margin: 30px 0 10px; transition: background .2s, border-color .2s; }
.dl:hover { background: var(--card); border-color: var(--ink); }
.dl .ic { width: 26px; height: 26px; }
.dl b { display: block; }
.dl small { color: var(--muted); font: 500 13px/1.3 var(--mono); }

.sharebox { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: end; background: var(--card); border: 2px solid var(--ink); border-radius: 26px; padding: 22px 22px 22px 16px; margin: 54px 0 10px; box-shadow: 6px 6px 0 var(--tc, var(--cyan)); }
.sharebox img { width: 64px; height: auto; animation: idle 3.2s ease-in-out infinite; }
.sharebox-t { font: 800 22px/1.1 var(--sans); letter-spacing: -.02em; margin: 0 0 4px; }
.sharebox p { margin: 0 0 14px; color: var(--muted); }
.share-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { display: inline-flex; align-items: center; gap: 8px; border: 2px solid var(--ink); background: var(--ink); color: #fff; border-radius: 999px; padding: 10px 16px; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .15s; }
.btn .ic { width: 17px; height: 17px; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn:hover { transform: translateY(-1px); }
.btn.ok { background: var(--ok); color: var(--ink); border-color: var(--ink); }

.more { padding-top: 30px; padding-bottom: 20px; }
.more h2 { margin-top: 20px; }
.allbtn { display: inline-flex; align-items: center; gap: 10px; margin: 24px 0 10px; font-weight: 750; text-decoration: none; border-bottom: 2px solid var(--ink); padding-bottom: 3px; }
.allbtn .ic { transition: transform .25s var(--ease); }
.allbtn:hover .ic { transform: translateX(4px); }

/* ── footer */
.foot { margin-top: 60px; background: var(--dark); color: #EDECE6; padding: 46px 0 50px; overflow: hidden; }
.foot-in { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: end; }
.foot-av { width: 74px; height: auto; animation: idle 3.2s ease-in-out infinite; }
.foot-big { font: 800 clamp(28px, 4.4vw, 44px)/1.08 var(--sans); letter-spacing: -.03em; margin: 0 0 10px; }
.foot-big em { color: var(--cyan); }
.foot-big em::after { display: none; }
.foot-sm { color: #B5B3BE; margin: 0 0 18px; max-width: 34em; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.foot-links a { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; font-size: 15px; font-weight: 600; color: #EDECE6; opacity: .9; }
.foot-links a:hover { opacity: 1; text-decoration: underline; }
.foot-links .ic { width: 17px; height: 17px; }

/* ── wider screens */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .style { grid-template-columns: 140px 1fr; }
  .dice { grid-template-columns: 1fr 1fr; }
  .dice-out { grid-column: 1 / -1; }
  .hero { grid-template-columns: 1fr 150px; }
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1fr 300px; grid-template-areas: 'tx av' 'nums av'; padding-top: 70px; }
  .hero-av { width: 196px; margin: 0 0 0 auto; }
  .bubble { left: -120px; top: 36px; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .how { margin-top: 56px; }
  .how-step { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 20px; }
  .how-step b { margin: 0; }
  .how-step span { flex-basis: 100%; }
  .lib { margin-top: 64px; }
  .finder { display: flex; gap: 16px; align-items: center; }
  .search { flex: 0 1 460px; }
  .chips { margin-top: 0; }
  .res-hero { padding-top: 46px; }
}
@media (max-width: 639px) {
  .hero { padding-top: 22px; }
  .hero-tx { padding-right: 0; }
  .nums { gap: 12px 20px; margin-top: 22px; }
  .nums b { font-size: 26px; }
  .bubble { display: none; }
  .how { grid-template-columns: 1fr; gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 4px 16px; margin-top: 26px; }
  .how-step { border: 0; border-radius: 0; background: none; padding: 12px 0; display: grid; grid-template-columns: 30px 1fr; gap: 0 12px; align-items: center; }
  .how-step + .how-step { border-top: 1px dashed var(--line); }
  .how-step b { margin: 0; font-size: 15px; }
  .how-step span { grid-column: 2; font-size: 13.5px; }
  .how-ic { grid-row: span 2; width: 24px; height: 24px; }
  .how-step:not(:last-child)::after { display: none; }
  .lib { margin-top: 30px; }
  .cover { height: 112px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .ic path, .ic circle, .ic rect { stroke-dashoffset: 0 !important; }
  h1 em::after, .foot-big em::after { transform: none; }
}
