/* KTV Industry public site. Neutral palette; light and dark follow the visitor's system setting. */
:root {
    --bg: #fafafa;
    --surface: #ffffff;
    --surface-muted: #f4f4f5;
    --border: #e4e4e7;
    --text: #18181b;
    --text-muted: #52525b;
    --text-subtle: #71717a;
    --accent: #27272a;
    --accent-hover: #3f3f46;
    --on-accent: #fafafa;
    --link: #1d4ed8;
    --positive: #15803d;
    --positive-bg: #dcfce7;
    --notice-bg: #fef9c3;
    --notice-text: #713f12;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 4px 16px rgb(0 0 0 / 0.04);
    --radius: 12px;
    --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: "Cascadia Mono", Consolas, ui-monospace, "SF Mono", Menlo, monospace;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f0f11;
        --surface: #18181b;
        --surface-muted: #1f1f23;
        --border: #2e2e33;
        --text: #f4f4f5;
        --text-muted: #a1a1aa;
        --text-subtle: #8b8b94;
        --accent: #f4f4f5;
        --accent-hover: #d4d4d8;
        --on-accent: #18181b;
        --link: #93b4ff;
        --positive: #4ade80;
        --positive-bg: #14532d;
        --notice-bg: #3a2f0b;
        --notice-text: #fde68a;
        --shadow: none;
        color-scheme: dark;
    }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 var(--font);
}

a { color: var(--link); text-underline-offset: 2px; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.25; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 8px; z-index: 10; background: var(--surface); padding: 8px 12px; }

/* ---- Header / footer ---- */
.site-header {
    position: sticky; top: 0; z-index: 5;
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 650; font-size: 17px; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-mark rect { fill: var(--accent); }
.brand-mark path { stroke: var(--on-accent); }
.header-nav { display: flex; align-items: center; gap: 20px; }
.header-nav > a { color: var(--text-muted); text-decoration: none; font-size: 15px; }
.header-nav > a:hover { color: var(--text); }
@media (max-width: 520px) { .header-nav > a { display: none; } }

.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; padding: 2px; background: var(--surface); }
.lang-switch button {
    font: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0.03em;
    border: 0; background: transparent; color: var(--text-muted);
    padding: 4px 10px; border-radius: 6px; cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

main { flex: 1; padding-top: 40px; padding-bottom: 64px; outline: none; }
.site-footer { border-top: 1px solid var(--border); color: var(--text-subtle); font-size: 14px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 20px; padding-bottom: 20px; }

/* ---- Common ---- */
.status { color: var(--text-muted); padding: 48px 0; text-align: center; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-subtle); }
.section { margin-top: 56px; }
.section > h2 { font-size: 22px; margin-bottom: 16px; }
.muted { color: var(--text-muted); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }

.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 42px; padding: 0 18px; border-radius: 10px;
    font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
    border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.button:hover { background: var(--surface-muted); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }
.button svg { width: 18px; height: 18px; flex: none; }

.badge {
    display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
    padding: 2px 10px; border-radius: 999px; background: var(--surface-muted); color: var(--text-muted);
    border: 1px solid var(--border); white-space: nowrap;
}
.badge.positive { background: var(--positive-bg); color: var(--positive); border-color: transparent; }

/* ---- Home ---- */
.hero { padding: 24px 0 8px; max-width: 720px; }
.hero h1 { font-size: clamp(30px, 5vw, 44px); margin: 10px 0 14px; }
.hero p { font-size: 18px; color: var(--text-muted); }

.app-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.app-card { display: flex; flex-direction: column; gap: 14px; padding: 22px; }
.app-card-head { display: flex; align-items: center; gap: 14px; }
.app-icon {
    width: 48px; height: 48px; border-radius: 12px; flex: none;
    display: grid; place-items: center; font-weight: 700; font-size: 20px;
    background: var(--surface-muted); border: 1px solid var(--border); color: var(--text);
}
.app-card h3 { font-size: 19px; }
.app-card h3 a { color: inherit; text-decoration: none; }
.app-card h3 a:hover { text-decoration: underline; }
.app-card .tagline { color: var(--text-muted); flex: 1; }
.app-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); counter-reset: step; padding: 0; margin: 0; list-style: none; }
.steps li { padding: 20px; counter-increment: step; }
.steps li::before {
    content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 12px;
    border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 14px;
}
.steps h3 { font-size: 16px; margin-bottom: 6px; }
.steps p { color: var(--text-muted); font-size: 15px; }

/* ---- App page ---- */
.back { display: inline-flex; gap: 6px; align-items: center; color: var(--text-muted); text-decoration: none; font-size: 15px; margin-bottom: 20px; }
.back:hover { color: var(--text); }
.app-header { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 860px) { .app-header { grid-template-columns: 1fr 360px; } }
.app-title { display: flex; gap: 18px; align-items: center; }
.app-title .app-icon { width: 64px; height: 64px; font-size: 28px; border-radius: 16px; }
.app-title h1 { font-size: clamp(28px, 4vw, 38px); }
.app-title .tagline { color: var(--text-muted); font-size: 18px; margin-top: 4px; }
.app-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.download-card { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.download-card .button { width: 100%; min-height: 48px; font-size: 16px; }
.file-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.file-facts dt { color: var(--text-subtle); }
.file-facts dd { margin: 0; min-width: 0; }
.hash { display: flex; gap: 6px; align-items: start; }
.hash code { font-family: var(--mono); font-size: 12px; word-break: break-all; color: var(--text-muted); }
.copy { flex: none; font: inherit; font-size: 12px; font-weight: 600; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); border-radius: 6px; padding: 1px 8px; cursor: pointer; }
.copy:hover { color: var(--text); }
.notice { font-size: 14px; background: var(--notice-bg); color: var(--notice-text); border-radius: 8px; padding: 10px 12px; }

.prose p + p { margin-top: 12px; }
.prose { max-width: 760px; color: var(--text); }

.two-col { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1fr 1fr; } }
.panel { padding: 22px; }
.panel h2 { font-size: 20px; margin-bottom: 14px; }

.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.check-list li { display: flex; gap: 10px; }
.check-list li::before { content: "✓"; color: var(--positive); font-weight: 700; flex: none; }

.num-list { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.num-list li::marker { font-weight: 700; color: var(--text-subtle); }

.gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.shot { padding: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface-muted); cursor: zoom-in; aspect-ratio: 16 / 10; }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

.changelog { list-style: none; margin: 0; padding: 0; }
.changelog > li { position: relative; padding: 0 0 26px 28px; border-left: 2px solid var(--border); margin-left: 7px; }
.changelog > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.changelog > li::before {
    content: ""; position: absolute; left: -8px; top: 5px; width: 14px; height: 14px; border-radius: 50%;
    background: var(--surface); border: 2px solid var(--text-subtle);
}
.changelog > li:first-child::before { background: var(--accent); border-color: var(--accent); }
.release-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.release-head h3 { font-size: 17px; font-family: var(--mono); }
.release-head time { color: var(--text-subtle); font-size: 14px; }
.release-notes { color: var(--text-muted); }
.release-notes ul { margin: 4px 0 0; padding-left: 20px; }
.release-notes p + p, .release-notes ul + p, .release-notes p + ul { margin-top: 6px; }

.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.contact-list span { color: var(--text-subtle); display: inline-block; min-width: 72px; }

/* ---- Screenshot viewer ---- */
.viewer { border: 0; padding: 0; background: transparent; max-width: min(1200px, 94vw); max-height: 92vh; }
.viewer::backdrop { background: rgb(0 0 0 / 0.8); }
.viewer img { max-height: 88vh; width: auto; margin: 0 auto; border-radius: 8px; }
.viewer form { text-align: right; }
.viewer-close { font: inherit; font-size: 28px; line-height: 1; border: 0; background: transparent; color: #fff; cursor: pointer; padding: 4px 8px; }

@media (prefers-reduced-motion: no-preference) {
    .button, .lang-switch button { transition: background-color 0.15s, color 0.15s; }
}
