:root {
    --bg: #f6f1e8;
    --bg-alt: #eef4f3;
    --surface: rgba(255, 255, 255, 0.86);
    --surface-strong: #ffffff;
    --ink: #16212d;
    --muted: #5f6d7d;
    --brand: #0f766e;
    --brand-strong: #115e59;
    --accent: #f97316;
    --accent-soft: rgba(249, 115, 22, 0.12);
    --line: rgba(22, 33, 45, 0.08);
    --success: #15803d;
    --warning: #d97706;
    --danger: #dc2626;
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --shadow-lg: 0 24px 72px rgba(22, 33, 45, 0.12);
    --shadow-md: 0 18px 44px rgba(22, 33, 45, 0.08);
    --shell: min(1320px, calc(100vw - 32px));
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: "Noto Sans JP", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.15), transparent 30%),
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.16), transparent 22%),
        linear-gradient(180deg, #fbf7f0 0%, #f4efe7 38%, #edf4f4 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 36px 36px;
    pointer-events: none;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    font: inherit;
}

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

.shell {
    width: var(--shell);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(20px);
    background: rgba(246, 241, 232, 0.84);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: #fff;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, var(--brand), #14b8a6 58%, #fb923c);
    box-shadow: 0 14px 32px rgba(15, 118, 110, 0.22);
}

.brand-copy {
    display: grid;
    gap: 2px;
}

.brand-title,
.footer-brand {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
}

.brand-subtitle {
    color: var(--muted);
    font-size: 13px;
}

.header-nav {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.header-nav a {
    color: var(--muted);
    font-size: 14px;
}

.hero,
.tool-section,
.content-section,
.faq-section {
    padding: 28px 0;
}

.hero-grid,
.tool-layout {
    display: grid;
    gap: 22px;
}

.hero-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    align-items: start;
    padding-top: 24px;
}

.hero-minimal {
    padding-top: 18px;
}

.hero-copy h1,
.section-heading h2 {
    margin: 0;
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-copy h1 {
    font-size: clamp(34px, 5vw, 58px);
    max-width: none;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--brand-strong);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 12px;
    font-weight: 700;
}

.hero-summary,
.section-heading p,
.section-subheading p,
.footer-copy,
.faq-item p,
.mini-card p,
.content-card li {
    color: var(--muted);
    line-height: 1.8;
}

.hero-actions,
.toolbar,
.toolbar-group,
.sample-buttons,
.footer-links,
.hero-points,
.tag-cloud,
.report-metrics {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    padding: 12px 18px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: linear-gradient(135deg, var(--brand), #14b8a6);
    color: #fff;
    box-shadow: 0 14px 32px rgba(15, 118, 110, 0.22);
}

.button-secondary,
.button-ghost,
.sample-button {
    background: rgba(255, 255, 255, 0.78);
    color: var(--ink);
    border: 1px solid var(--line);
}

.file-button {
    display: inline-flex;
    align-items: center;
}

.hero-points {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
}

.hero-points li {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--line);
}

.hero-panel,
.panel,
.mini-card,
.content-card,
.faq-item {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(18px);
}

.hero-panel,
.panel,
.content-card,
.faq-item {
    border-radius: var(--radius-xl);
}

.hero-panel,
.panel {
    padding: 22px;
}

.hero-highlight-list,
.bullet-list {
    margin: 0;
    padding-left: 18px;
}

.feature-strip-grid,
.content-grid {
    display: grid;
    gap: 18px;
}

.mini-card,
.content-card {
    padding: 20px;
}

.mini-card h2,
.content-card h2,
.section-subheading h3 {
    margin: 0 0 10px;
    font-size: 22px;
    letter-spacing: -0.03em;
}

.tool-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
}

.tool-main,
.tool-sidebar {
    display: grid;
    gap: 18px;
}

.section-heading {
    margin-bottom: 14px;
}

.section-heading h2 {
    font-size: clamp(24px, 3vw, 34px);
}

.dropzone {
    margin-top: 18px;
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px dashed rgba(15, 118, 110, 0.36);
    background: rgba(15, 118, 110, 0.05);
    display: grid;
    gap: 4px;
    text-align: center;
    color: var(--muted);
}

.dropzone.active {
    background: rgba(15, 118, 110, 0.12);
    border-color: var(--brand);
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.toggle-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--line);
}

.toggle-card strong,
.editor-head h3,
.report-block h4 {
    display: block;
}

.toggle-card small {
    color: var(--muted);
    line-height: 1.6;
}

.toggle-card input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    accent-color: var(--brand);
}

.editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.editor-card {
    padding: 18px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid var(--line);
    min-width: 0;
}

.editor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.editor-head h3,
.faq-item summary {
    margin: 0;
    font-size: 18px;
}

.meta-chip {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.08);
    color: var(--brand-strong);
    font-size: 12px;
    font-weight: 700;
}

.editor {
    width: 100%;
    min-height: 360px;
    border: 1px solid rgba(22, 33, 45, 0.12);
    border-radius: 16px;
    background: #fff;
    padding: 18px;
    color: var(--ink);
    font-family: "SFMono-Regular", "Consolas", monospace;
    line-height: 1.65;
    resize: vertical;
}

.editor:focus {
    outline: 2px solid rgba(15, 118, 110, 0.16);
    border-color: var(--brand);
}

.editor-output {
    background: #f8fcfb;
}

.loading {
    margin-top: 16px;
    display: none;
    align-items: center;
    gap: 12px;
    color: var(--muted);
}

.loading.visible {
    display: flex;
}

.loading-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(15, 118, 110, 0.16);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.report-panel {
    position: sticky;
    top: 96px;
}

.metric-card {
    flex: 1 1 130px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--line);
}

.metric-label {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 6px;
}

.metric-value {
    font-size: 28px;
    letter-spacing: -0.04em;
}

.tag-cloud {
    margin-top: 16px;
}

.tag {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(22, 33, 45, 0.06);
    font-size: 12px;
}

.tag-warning {
    background: rgba(217, 119, 6, 0.12);
    color: #92400e;
}

.tag-danger {
    background: rgba(220, 38, 38, 0.12);
    color: #991b1b;
}

.report-block {
    margin-top: 18px;
}

.report-block h4 {
    margin: 0 0 10px;
}

.bullet-list li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.empty-list {
    color: var(--muted);
}

.history-list {
    display: grid;
    gap: 12px;
}

.history-item {
    width: 100%;
    text-align: left;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.8);
    cursor: pointer;
}

.history-item time {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 6px;
}

.history-item strong {
    display: block;
    margin-bottom: 6px;
}

.history-item span,
.muted {
    color: var(--muted);
}

.sample-section {
    padding-bottom: 12px;
}

.sample-buttons {
    margin-top: 18px;
}

.sample-button {
    padding: 12px 16px;
    border-radius: 16px;
    cursor: pointer;
}

.content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.faq-list {
    display: grid;
    gap: 14px;
}

.page-main {
    padding: 32px 0 56px;
}

.prose-shell {
    max-width: 900px;
}

.prose-card {
    padding: 28px;
}

.prose-card h1,
.prose-card h2 {
    letter-spacing: -0.04em;
}

.prose-card h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 52px);
}

.prose-card h2 {
    margin: 30px 0 12px;
    font-size: 28px;
}

.prose-card p,
.prose-card li {
    color: var(--muted);
    line-height: 1.9;
}

.prose-card ul,
.prose-card ol {
    padding-left: 22px;
}

.faq-item {
    padding: 18px 20px;
}

.faq-item summary {
    cursor: pointer;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

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

.site-footer {
    border-top: 1px solid var(--line);
    padding: 28px 0 42px;
    margin-top: 12px;
}

.footer-grid {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.footer-links {
    align-items: center;
}

@media (max-width: 1080px) {
    .hero-grid,
    .tool-layout,
    .feature-strip-grid,
    .content-grid,
    .options-grid,
    .editor-grid {
        grid-template-columns: 1fr;
    }

    .report-panel {
        position: static;
    }
}

@media (max-width: 720px) {
    .header-inner {
        padding: 12px 0;
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-copy h1 {
        max-width: none;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-group {
        width: 100%;
    }

    .button,
    .sample-button {
        width: 100%;
        justify-content: center;
    }
}
