/* Dev Card Studio — styles.css
   Mobile-first, dark/light themes via [data-theme]. No external fonts or libraries. */

:root {
  --bg: #070b16; --bg2: #0b1226; --surface: #0f1830; --surface2: #15203d; --line: rgba(160, 185, 255, .14);
  --text: #e9eefc; --muted: #9eabc9; --brand: #3b8dff; --brand2: #22d3ee; --gold: #ffb62e; --on-brand: #04122b;
  --danger: #ff6b81; --ok: #34e3a0; --radius: 16px; --radius-sm: 11px; --hdr: 60px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45); --glow: 0 0 0 1px rgba(59, 141, 255, .35), 0 10px 40px rgba(59, 141, 255, .18);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f4f7fd; --bg2: #e9eff9; --surface: #ffffff; --surface2: #f0f4fc; --line: rgba(15, 30, 70, .13);
  --text: #0d1730; --muted: #55627f; --brand: #1a62e6; --brand2: #0891b2; --gold: #c77d00; --on-brand: #ffffff;
  --danger: #d62d4a; --ok: #0f9d6b; --shadow: 0 14px 40px rgba(20, 40, 90, .12); --glow: 0 0 0 1px rgba(26, 98, 230, .3), 0 10px 30px rgba(26, 98, 230, .12);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr) + 12px); }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.55; min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(900px 500px at 8% -5%, rgba(59, 141, 255, .16), transparent 60%), radial-gradient(800px 500px at 100% 0%, rgba(255, 182, 46, .08), transparent 60%); }
[data-theme="light"] body::before { background: radial-gradient(900px 500px at 8% -5%, rgba(26, 98, 230, .1), transparent 60%), radial-gradient(800px 500px at 100% 0%, rgba(255, 182, 46, .12), transparent 60%); }
img, canvas, svg { max-width: 100%; }
a { color: var(--brand); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(1.9rem, 5.4vw, 3.2rem); } h2 { font-size: clamp(1.4rem, 3.6vw, 2rem); } h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; } ul, ol { padding-left: 1.2em; margin: 0 0 1em; } li { margin: .3em 0; }
:focus-visible { outline: 3px solid var(--brand2); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: 1220px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }
main { flex: 1 0 auto; width: 100%; }
.i { flex: none; vertical-align: -.2em; }
[hidden] { display: none !important; }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 44px; padding: .55em 1.15em; border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 700; color: var(--on-brand);
  background: linear-gradient(135deg, var(--brand), var(--brand2)); text-decoration: none !important; transition: transform .12s, box-shadow .2s, opacity .2s; touch-action: manipulation; }
.btn:hover { box-shadow: var(--glow); } .btn:active { transform: translateY(1px) scale(.99); } .btn[disabled] { opacity: .55; cursor: progress; }
.btn.gold { background: linear-gradient(135deg, #ffb62e, #ffd76a); color: #201400; }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); } .btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--brand); }
.btn.danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1.5px var(--danger); }
.btn.sm { min-height: 38px; padding: .35em .9em; font-size: .9rem; }
.btn.lg { min-height: 52px; padding: .7em 1.6em; font-size: 1.05rem; }
input, select, textarea { width: 100%; font: inherit; color: var(--text); background: var(--surface2); border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: .65em .8em; min-height: 44px; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59, 141, 255, .25); }
textarea { resize: vertical; min-height: 80px; } input[type=color] { padding: 2px; height: 44px; cursor: pointer; } input[type=range] { padding: 0; min-height: 32px; accent-color: var(--brand); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; accent-color: var(--brand); flex: none; }
.field { display: block; margin-bottom: 12px; min-width: 0; } .field > span { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; } @media (max-width: 380px) { .row2 { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; cursor: pointer; font-weight: 600; }
.note { font-size: .86rem; color: var(--muted); margin: 6px 0; } .note.err { color: var(--danger); }
.sub { font-size: .8rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 20px 0 10px; font-weight: 700; }
.sub:first-child { margin-top: 0; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--hdr); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; gap: 12px; height: 100%; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; letter-spacing: -.02em; white-space: nowrap; text-decoration: none !important; }
.brand img { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 0 0 1px var(--line); } .brand b { color: var(--gold); }
.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.main-nav > a, .nav-label { display: inline-flex; align-items: center; gap: 6px; padding: .5em .85em; border-radius: 999px; color: var(--text); font: inherit; font-weight: 600; font-size: .95rem; background: none; border: 0; cursor: pointer; text-decoration: none !important; min-height: 40px; }
.main-nav > a:hover, .nav-label:hover, .nav-group.open > .nav-label, .main-nav a[aria-current=page], .nav-group.has-current > .nav-label { background: var(--surface2); }
.main-nav a[aria-current=page] { color: var(--brand2); }
.nav-group { position: relative; } .nav-links { display: none; }
.nav-group.open .nav-links { display: grid; position: absolute; top: calc(100% + 8px); left: 0; min-width: 250px; padding: 8px; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.nav-links a { display: flex; align-items: center; gap: 10px; padding: .6em .8em; border-radius: 10px; color: var(--text); font-weight: 600; text-decoration: none !important; }
.nav-links a:hover, .nav-links a[aria-current=page] { background: var(--surface2); } .nav-links .i { color: var(--brand2); }
.header-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--surface2); color: var(--text); cursor: pointer; }
.icon-btn:hover { box-shadow: inset 0 0 0 1.5px var(--brand); }
#menuBtn { display: none; } [data-theme=dark] .i-sun { display: inline; } [data-theme=dark] .i-moon { display: none; } [data-theme=light] .i-sun { display: none; } [data-theme=light] .i-moon { display: inline; }
@media (max-width: 899px) {
  #menuBtn { display: inline-flex; }
  .header-actions { margin-left: auto; }
  .main-nav { position: fixed; inset: var(--hdr) 0 0 0; margin: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 14px 16px 90px; background: var(--bg); overflow-y: auto; opacity: 0; transform: translateY(-8px); visibility: hidden; pointer-events: none; transition: opacity .2s, transform .2s, visibility .2s; z-index: 40; }
  .main-nav.open { opacity: 1; transform: none; visibility: visible; pointer-events: auto; }
  .main-nav > a { padding: .8em 1em; font-size: 1.05rem; }
  .nav-label { padding: .8em 1em .3em; pointer-events: none; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
  .nav-label .i { display: none; } .nav-group .nav-links { display: grid !important; position: static; border: 0; box-shadow: none; background: none; padding: 0 0 8px; min-width: 0; }
  .nav-links a { padding: .75em 1em; font-size: 1.02rem; }
  body.menu-open { overflow: hidden; }
  .brand span { font-size: .98rem; }
}

/* ---------- sections / cards ---------- */
.section { padding: clamp(28px, 6vw, 64px) 0; }
.section-head { max-width: 680px; margin-bottom: 26px; } .section-head p { color: var(--muted); }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.grad-text { background: linear-gradient(100deg, var(--brand2), var(--brand) 45%, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* hero */
.hero { padding: clamp(26px, 6vw, 70px) 0 clamp(20px, 4vw, 40px); }
.hero-in { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .hero-in { grid-template-columns: 1.1fr .9fr; } }
.hero p.lead { font-size: clamp(1.02rem, 2.4vw, 1.2rem); color: var(--muted); max-width: 560px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 6px; }
.hero-art { position: relative; justify-self: center; width: min(420px, 82vw); }
.hero-art img { width: 100%; height: auto; border-radius: 28px; box-shadow: var(--glow), var(--shadow); aspect-ratio: 1; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding: 0; list-style: none; }
.pills li { margin: 0; padding: .35em .85em; border-radius: 999px; background: var(--surface2); border: 1px solid var(--line); font-size: .85rem; font-weight: 600; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; } .pills .i { color: var(--ok); }

.tool-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.tool { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none !important; transition: transform .15s, border-color .2s, box-shadow .2s; }
.tool:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--glow); }
.tool .ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(135deg, rgba(59, 141, 255, .2), rgba(34, 211, 238, .16)); color: var(--brand2); }
.tool.gold .ico { background: linear-gradient(135deg, rgba(255, 182, 46, .24), rgba(255, 215, 106, .14)); color: var(--gold); }
.tool h3 { margin: 4px 0 0; } .tool p { margin: 0; color: var(--muted); font-size: .93rem; } .tool .go { margin-top: auto; padding-top: 6px; color: var(--brand2); font-weight: 700; font-size: .9rem; }
.feature-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.feature { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); } .feature .i { color: var(--gold); margin-bottom: 8px; } .feature h3 { font-size: 1.02rem; } .feature p { margin: 0; color: var(--muted); font-size: .92rem; }
.prose { max-width: 820px; } .prose h2 { margin-top: 1.6em; } .prose h3 { margin-top: 1.3em; } .prose p, .prose li { color: color-mix(in srgb, var(--text) 86%, var(--muted)); }
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 10px; }
.steps li { counter-increment: s; position: relative; padding: 14px 16px 14px 58px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 0; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: linear-gradient(135deg, var(--brand), var(--brand2)); color: var(--on-brand); }
details.faq { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); margin: 8px 0; padding: 0 16px; }
details.faq summary { cursor: pointer; padding: 14px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 10px; } details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-size: 1.3rem; color: var(--brand2); line-height: 1; } details.faq[open] summary::after { content: "–"; } details.faq p { color: var(--muted); }
.page-head { padding: clamp(22px, 4vw, 44px) 0 8px; } .page-head p { color: var(--muted); max-width: 760px; font-size: 1.02rem; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 10px; } .crumbs a { color: var(--muted); }

/* ---------- ad slots (hidden unless live — see ads-config.js) ---------- */
.ad-slot-placeholder { display: none; }
.ad-slot-placeholder.is-live { display: block; width: 100%; max-width: 100%; margin: 18px auto; text-align: center; overflow: hidden; }
.ad-slot-placeholder.is-live::before { content: "Advertisement"; display: block; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.ad-slot-inner { display: flex; justify-content: center; align-items: center; max-width: 100%; overflow: hidden; } .ad-slot-inner iframe, .ad-slot-inner ins, .ad-slot-inner img { max-width: 100%; }
.ad-slot-placeholder.ad-side.is-live { margin: 16px 0 0; }

/* ---------- editor ---------- */
.editor { padding: 8px 0 30px; }
.editor-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.controls { order: 2; } .preview-col { order: 1; min-width: 0; }
@media (min-width: 960px) {
  .editor-grid { grid-template-columns: minmax(360px, 470px) minmax(0, 1fr); align-items: start; gap: 22px; }
  .controls { order: 1; } .preview-col { order: 2; position: sticky; top: calc(var(--hdr) + 14px); }
}
.tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 14px; background: var(--surface2); border-radius: 999px; overflow-x: auto; scrollbar-width: none; }
.tabs button { flex: 1 0 auto; min-height: 40px; padding: .4em 1em; border: 0; border-radius: 999px; background: none; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected=true] { background: var(--surface); color: var(--text); box-shadow: 0 1px 6px rgba(0, 0, 0, .25), inset 0 0 0 1px var(--line); }
.preview-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.seg { display: inline-flex; padding: 3px; background: var(--surface2); border-radius: 999px; }
.seg button { min-height: 36px; padding: .3em 1.1em; border: 0; border-radius: 999px; background: none; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; }
.seg button[aria-pressed=true] { background: linear-gradient(135deg, var(--brand), var(--brand2)); color: var(--on-brand); }
.stage { display: grid; place-items: center; padding: clamp(10px, 3vw, 22px); border-radius: var(--radius); background: repeating-conic-gradient(var(--surface2) 0 25%, transparent 0 50%) 0 0 / 22px 22px; border: 1px solid var(--line); }
#cv { display: block; width: 100%; height: auto; max-width: 560px; border-radius: 12px; box-shadow: 0 14px 40px rgba(0, 0, 0, .4); background: #fff; }
.editor-landscape #cv { max-width: 620px; }
body:not(.editor-landscape) #cv { max-width: min(100%, 330px); }
@media (min-width: 960px) { body:not(.editor-landscape) #cv { max-width: min(100%, 380px, 62vh); } .editor-landscape #cv { max-width: 700px; } }
.extra-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; } .extra-actions:empty { display: none; }
.actionbar { display: flex; gap: 8px; margin-top: 14px; } .actionbar .btn { flex: 1; }
.hint { font-size: .85rem; color: var(--muted); margin: 12px 0 0; }
.tpl-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); }
body:not(.editor-landscape) .tpl-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
.tpl { display: flex; flex-direction: column; gap: 6px; padding: 6px; border: 2px solid transparent; border-radius: 12px; background: var(--surface2); cursor: pointer; color: var(--text); font: inherit; text-align: center; }
.tpl canvas { width: 100%; height: auto; border-radius: 7px; display: block; background: #fff; } .tpl span { font-size: .78rem; font-weight: 700; }
.tpl[aria-selected=true] { border-color: var(--brand2); box-shadow: var(--glow); } .tpl:hover { border-color: var(--brand); }
.themes { display: flex; flex-wrap: wrap; gap: 10px; } .swatch { width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; } .swatch:hover { transform: scale(1.1); }
.colors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; } .colorf { display: block; text-align: center; font-size: .75rem; font-weight: 600; color: var(--muted); } .colorf input { margin-bottom: 4px; }
@media (max-width: 380px) { .colors { grid-template-columns: repeat(2, 1fr); } }
.uploader { padding: 14px; border: 1.5px dashed var(--line); border-radius: var(--radius-sm); margin-bottom: 14px; background: var(--surface2); }
.uphead { display: flex; flex-direction: column; margin-bottom: 10px; } .uphead small, .upname { color: var(--muted); font-size: .82rem; }
.uprow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .upthumb { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.adjust { margin-bottom: 14px; }
@media (max-width: 959px) {
  body.has-editor { padding-bottom: 86px; }
  .actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; margin: 0; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .editor-landscape .editor-grid { display: flex; flex-direction: column; }
  .editor-landscape .preview-col { position: sticky; top: var(--hdr); z-index: 20; }
  .editor-landscape .preview-col > .panel { padding: 10px 12px 8px; box-shadow: 0 8px 22px rgba(0, 0, 0, .18); }
  .editor-landscape .preview-col .hint, .editor-landscape .preview-col .extra-actions { display: none; }
  .editor-landscape .preview-sticky .stage { padding: 6px; } .editor-landscape #cv { max-width: min(100%, 420px, 40vh * 1.75); }
}

/* dialog */
dialog { width: min(440px, calc(100vw - 28px)); padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(3, 8, 20, .66); backdrop-filter: blur(3px); }
.dlg { padding: 20px; } .dlg h2 { font-size: 1.3rem; } fieldset { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; } legend { font-weight: 700; font-size: .85rem; color: var(--muted); margin-bottom: 8px; padding: 0; }
.opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; margin-bottom: 6px; cursor: pointer; font-weight: 600; } .opt:has(input:checked) { border-color: var(--brand); background: var(--surface2); } .opt small { display: block; color: var(--muted); font-weight: 400; }
.dlg-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; } .dlg-actions .btn { flex: 1; }

/* ---------- tools ---------- */
.tool-ui { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); margin-bottom: 20px; }
@media (min-width: 960px) { .tool-ui.two { grid-template-columns: minmax(340px, 480px) minmax(0, 1fr); align-items: start; } }
.drop { display: grid; place-items: center; text-align: center; gap: 6px; padding: 28px 16px; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--surface2); cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--surface2)); } .drop .i { color: var(--brand2); } .drop small { color: var(--muted); }
.result-box { display: grid; place-items: center; padding: 16px; border-radius: var(--radius); background: repeating-conic-gradient(var(--surface2) 0 25%, transparent 0 50%) 0 0 / 22px 22px; border: 1px solid var(--line); min-height: 220px; }
.result-box canvas, .result-box img, .result-box svg { max-width: 100%; height: auto; border-radius: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; } .chip { padding: .4em .9em; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface2); color: var(--text); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; min-height: 36px; } .chip:hover, .chip[aria-pressed=true] { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, var(--surface2)); }
.list { display: grid; gap: 8px; } .item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface2); }
.item img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; flex: none; } .item .meta { flex: 1; min-width: 0; font-size: .88rem; } .item .meta b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .item .meta small { color: var(--muted); }
.item .btn { min-height: 34px; padding: .2em .7em; } .stat { font-weight: 800; color: var(--ok); }
.sig-preview { padding: 18px; background: #fff; color: #222; border-radius: 12px; overflow-x: auto; }

/* my cards */
.cards-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.mycard { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.mycard .thumb { display: grid; place-items: center; padding: 14px; background: repeating-conic-gradient(var(--surface2) 0 25%, transparent 0 50%) 0 0 / 20px 20px; min-height: 150px; } .mycard .thumb img { max-width: 100%; max-height: 190px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.mycard .body { padding: 12px 14px 14px; display: grid; gap: 8px; } .mycard h3 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; } .mycard small { color: var(--muted); } .mycard .acts { display: flex; flex-wrap: wrap; gap: 6px; }
.empty { text-align: center; padding: 40px 16px; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.meter { height: 8px; border-radius: 99px; background: var(--surface2); overflow: hidden; margin: 6px 0; } .meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand2), var(--brand)); }

/* digital profile view */
.profile { max-width: 460px; margin: 0 auto; padding: 0 0 40px; text-align: center; }
.profile .cover { height: 150px; border-radius: 0 0 50% 50% / 0 0 40px 40px; }
.profile .avatar { width: 128px; height: 128px; border-radius: 50%; margin: -64px auto 0; display: grid; place-items: center; font-size: 2.6rem; font-weight: 800; border: 6px solid var(--pbg, var(--bg)); position: relative; }
.profile h1 { font-size: 1.8rem; margin: 12px 0 2px; } .profile .role { font-weight: 700; margin: 0 0 4px; } .profile .loc { color: var(--muted); font-size: .92rem; }
.profile .bio { margin: 14px 8px; color: var(--muted); }
.plinks { display: grid; gap: 10px; margin: 18px 0; text-align: left; } .plink { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-weight: 600; text-decoration: none !important; overflow-wrap: anywhere; }
.plink .ic { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--pc, var(--brand)); color: var(--pon, #fff); }
.pstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; } .pstats div { padding: 12px 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); } .pstats b { display: block; font-size: 1.4rem; } .pstats small { color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { margin-top: 30px; background: var(--bg2); border-top: 1px solid var(--line); padding: 34px 0 20px; flex: none; }
.foot-grid { display: grid; gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-grid > :first-child { grid-column: 1 / -1; }
@media (min-width: 800px) { .foot-grid { grid-template-columns: 1.5fr 1fr 1.1fr 1.1fr 1fr; } .foot-grid > :first-child { grid-column: auto; } }
.site-footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 10px; } .site-footer ul { list-style: none; padding: 0; margin: 0; } .site-footer li { margin: 6px 0; }
.site-footer a { color: var(--text); font-weight: 500; } .site-footer a:hover { color: var(--brand2); } .site-footer p { color: var(--muted); font-size: .92rem; }
.foot-bottom { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }

/* toast */
.toasts { position: fixed; z-index: 100; left: 0; right: 0; bottom: calc(86px + env(safe-area-inset-bottom)); display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 14px; }
@media (min-width: 960px) { .toasts { bottom: 24px; } }
.toast { max-width: 520px; padding: .7em 1.1em; border-radius: 14px; background: var(--surface2); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow); font-weight: 600; font-size: .92rem; opacity: 0; transform: translateY(10px); transition: .25s; }
.toast.in { opacity: 1; transform: none; } .toast.err { border-color: var(--danger); }

@media (max-width: 560px) { .header-actions [data-install] { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .ad-slot-placeholder, .actionbar { display: none !important; } }

/* ---------------------------------------------------------------- greeting / festival cards */
.occ-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .occ-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .occ-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .occ-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.occ-tile { display: flex; flex-direction: column; gap: 8px; padding: 8px 8px 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none !important; font-weight: 700; font-size: .92rem; text-align: center; transition: transform .15s, border-color .2s, box-shadow .2s; }
.occ-tile:hover, .occ-tile:focus-visible { transform: translateY(-3px); border-color: var(--gold); box-shadow: var(--glow); }
.occ-tile canvas { width: 100%; height: auto; aspect-ratio: 1 / 1.41; border-radius: calc(var(--radius) - 6px); background: var(--surface2, rgba(127, 127, 127, .12)); display: block; }
.suggest { margin: -4px 0 12px; }

.foot-grid a { overflow-wrap: anywhere; }
