:root {
    --bg: #232323;
    --text: #ffffff;
    --muted: #999999;
    --divider: #3a3a3a;
    --sidebar-selected: #1d1d1d;
    --blue: #007cff;
    --button-gray: #6d6d6d;
    --dropdown: #383838;
    --input-bg: #1d1d1d;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: "Geist", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

.shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 316px 1px minmax(0, 1fr);
    align-items: start;
}

.sidebar {
    height: 100vh;
    position: sticky;
    top: 0;
    padding: 36px 32px 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    flex-direction: column;
    text-decoration: none;
    margin-bottom: 42px;
}

.brand-title {
    font-size: 32px;
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--muted);
}

.brand-tagline {
    margin-top: 10px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.35;
    font-weight: 400;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.app-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 22px;
    text-decoration: none;
    transition: background-color 140ms ease;
}

.app-link.active {
    background: var(--sidebar-selected);
}

.app-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    flex: 0 0 auto;
    overflow: hidden;
}

.app-icon img {
    width: 56px;
    height: 56px;
}

.app-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.app-name {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

.app-meta {
    margin-top: 2px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.2;
    font-weight: 400;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-link {
    display: block;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 18px;
    transition: background-color 140ms ease;
}

.footer-link.active {
    background: var(--sidebar-selected);
}

.footer-title {
    display: block;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

.footer-meta {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.25;
    font-weight: 400;
}

.divider {
    background: var(--divider);
    height: 100vh;
    position: sticky;
    top: 0;
    opacity: 0;
    transition: opacity 140ms ease;
}

body.has-selection .divider {
    opacity: 1;
}

.content {
    padding: 36px 32px 40px;
    min-width: 0;
}

.panel {
    max-width: 620px;
}

.panel[hidden] {
    display: none;
}

.panel-home {
    max-width: none;
    min-height: calc(100vh - 76px);
}

.koku-panel {
    max-width: none;
}

.content-column {
    max-width: 620px;
}

.app-panel h1,
.support-panel h1 {
    margin: 0;
    font-size: 32px;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.subtitle {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.45;
    font-weight: 400;
}

.copy-block {
    margin-top: 18px;
    display: grid;
    gap: 14px;
}

.copy-block p,
.faq-item p,
.text-link,
.bullet-list {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.45;
    font-weight: 400;
}

.copy-block p {
    margin: 0;
}

.bullet-list {
    margin: 16px 0 0;
    padding-left: 22px;
}

.bullet-list li + li {
    margin-top: 2px;
}

.text-link {
    display: inline-block;
    margin-top: 12px;
    text-underline-offset: 3px;
}

.text-link-top {
    margin-top: 14px;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 26px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
}

.button-primary {
    background: var(--blue);
    color: #fff;
}

.button-secondary,
.button-disabled {
    background: var(--button-gray);
    color: #fff;
}

.shot-scroller {
    width: 100%;
    max-width: calc(100vw - 381px);
    margin-top: 38px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--input-bg) transparent;
}

.shot-scroller::-webkit-scrollbar {
    height: 6px;
}

.shot-scroller::-webkit-scrollbar-track {
    background: transparent;
}

.shot-scroller::-webkit-scrollbar-thumb {
    background: var(--input-bg);
    border-radius: 999px;
}

.shot-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 22px;
    width: max-content;
}

.shot-card {
    margin: 0;
    flex: 0 0 auto;
    width: 180px;
}

.shot-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.faq-section {
    margin-top: 38px;
}

.faq-section h2 {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.2;
    font-weight: 700;
}

.faq-plain {
    display: grid;
    gap: 20px;
}

.faq-item h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.25;
    font-weight: 500;
}

.faq-item p {
    margin: 4px 0 0;
}

.support-panel {
    max-width: 560px;
}

.support-form {
    margin-top: 28px;
}

.support-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.support-form select,
.support-form textarea,
.support-form input {
    width: 100%;
    border: 0;
    outline: 0;
    border-radius: 14px;
    background: var(--dropdown);
    color: #fff;
    padding: 0 16px;
}

.support-form select {
    height: 38px;
    font-size: 16px;
    font-weight: 700;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, white 50%),
        linear-gradient(135deg, white 50%, transparent 50%);
    background-position:
        calc(100% - 22px) calc(50% - 2px),
        calc(100% - 15px) calc(50% - 2px);
    background-size: 7px 7px, 7px 7px;
    background-repeat: no-repeat;
    padding-right: 34px;
}

.support-form textarea,
.support-form input {
    background: var(--input-bg);
    font-size: 16px;
    font-weight: 400;
}

.support-form textarea {
    min-height: 198px;
    resize: vertical;
    padding-top: 14px;
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.support-form input {
    height: 52px;
    margin-bottom: 38px;
}

.support-form textarea::placeholder,
.support-form input::placeholder {
    color: #5e5e5e;
}

.support-status {
    margin: 0 0 18px;
    font-size: 16px;
    line-height: 1.45;
}

.support-status[data-kind="success"] {
    color: #9dd68c;
}

.support-status[data-kind="error"] {
    color: #ff8d8d;
}

#support-submit:disabled {
    opacity: 0.75;
}

.policy-plain {
    margin-top: 26px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 980px) {
    .shell {
        grid-template-columns: 1fr;
    }

    .divider {
        display: none;
    }

    .sidebar {
        min-height: auto;
        padding-bottom: 24px;
    }

    .content {
        padding-top: 0;
    }
}

@media (max-width: 740px) {
    .sidebar,
    .content {
        padding-left: 20px;
        padding-right: 20px;
    }

    .support-row {
        grid-template-columns: 1fr;
        display: grid;
    }

    .shot-card {
        width: 160px;
    }

    .button {
        width: 100%;
    }
}
