﻿:root {
    --color-main: #211615;
    --color-main-soft: #3a2a28;
    --color-accent: #f6bf3a;
    --color-accent-soft: #fff8e7;
    --color-border: #d9d2cc;
    --color-border-light: #ebe6e2;
    --color-text: #211615;
    --color-text-sub: #5c504d;
    --color-bg: #ffffff;
    --color-error: #b42318;
    --color-error-bg: #fff2f2;
    --color-success: #5d4b12;
    --color-success-bg: #fff8e7;
    --color-footer-bg: #0b0a0a;
    --color-footer-text: #8d8681;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
    line-height: 1.6;
}

body {
    min-height: 100vh;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
textarea,
select {
    font: inherit;
}

a {
    color: inherit;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

.site-container {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.site-header {
    padding-top: 18px;
    padding-bottom: 8px;
    border-top: 4px solid var(--color-main);
}

.site-logo-link {
    display: inline-block;
    text-decoration: none;
}

.site-logo {
    display: block;
    width: auto;
    max-width: 320px;
    max-height: 88px;
    object-fit: contain;
}

.site-main {
    flex: 1;
    padding-top: 8px;
    padding-bottom: 64px;
}

.site-footer {
    background: var(--color-footer-bg);
    color: var(--color-footer-text);
    font-size: 0.95rem;
    padding-top: 18px;
    padding-bottom: 18px;
    margin-top: 40px;
}

.inquiry-section {
    padding-top: 6px;
}

.page-title {
    margin: 0 0 10px 0;
    font-size: 1.55rem;
    font-weight: 500;
    color: var(--color-text);
}

.page-description {
    margin: 0 0 34px 0;
    font-size: 1rem;
    color: var(--color-text-sub);
}

.inquiry-form {
    max-width: 760px;
}

.form-row {
    display: grid;
    grid-template-columns: 180px minmax(0, 340px);
    column-gap: 20px;
    align-items: start;
    margin-bottom: 18px;
}

.form-label-custom {
    padding-top: 10px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.5;
}

.required-mark {
    color: var(--color-accent);
    margin-left: 2px;
    font-weight: 700;
}

.form-input-wrap {
    width: 100%;
}

.form-control-custom {
    width: 100%;
    height: 44px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: #ffffff;
    padding: 0 14px;
    font-size: 1rem;
    color: var(--color-text);
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

    .form-control-custom::placeholder {
        color: #b8afa9;
    }

    .form-control-custom:focus {
        outline: none;
        border-color: var(--color-accent);
        box-shadow: 0 0 0 2px rgba(246, 191, 58, 0.20);
        background: #fffefb;
    }

.form-action {
    margin-top: 8px;
    padding-left: 200px;
}

.btn-search,
.btn-sub {
    min-width: 88px;
    height: 44px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.05s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn-search {
    border: none;
    background: var(--color-main);
    color: #ffffff;
    font-size: 1.35rem;
    line-height: 1;
    padding: 0 18px;
}

    .btn-search:hover {
        background: var(--color-main-soft);
    }

    .btn-search:active,
    .btn-sub:active,
    .accordion-trigger:active,
    .modal-close:active {
        transform: translateY(1px);
    }

    .btn-search:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.btn-search-small {
    min-width: 96px;
    font-size: 1rem;
}

.btn-sub {
    border: 1px solid var(--color-border);
    background: #ffffff;
    color: var(--color-text);
    font-size: 0.98rem;
    padding: 0 16px;
}

    .btn-sub:hover {
        border-color: var(--color-accent);
        background: var(--color-accent-soft);
    }

.validation-summary {
    margin-bottom: 18px;
    color: var(--color-error);
    font-size: 0.92rem;
}

.field-validation-message {
    display: block;
    margin-top: 6px;
    color: var(--color-error);
    font-size: 0.88rem;
}

.message-block {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 4px;
    font-size: 0.95rem;
}

.message-block-error {
    background: var(--color-error-bg);
    border: 1px solid #f1c9c9;
    color: var(--color-error);
}

.message-block-success {
    background: var(--color-success-bg);
    border: 1px solid #f0dfaa;
    color: var(--color-success);
}

.section-divider {
    border: 0;
    border-top: 1px dotted var(--color-border-light);
    margin: 36px 0 0 0;
}

.result-section {
    padding-top: 28px;
}

.result-block {
    margin-bottom: 28px;
}

.qr-action-block {
    margin-top: -8px;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

    .result-table th,
    .result-table td {
        border: 1px solid var(--color-border-light);
        padding: 12px 14px;
        vertical-align: top;
        font-size: 0.95rem;
    }

    .result-table th {
        width: 280px;
        background: #fcfbfa;
        font-weight: 700;
        color: var(--color-text);
    }

.accordion-list {
    display: grid;
    gap: 12px;
}

.accordion-item {
    border: 1px solid #201918;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.accordion-heading {
    margin: 0;
}

.accordion-trigger {
    width: 100%;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 18px;
    border: none;
    background: #211615;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

    .accordion-trigger:hover {
        background: #322422;
    }

    .accordion-trigger.open {
        background: #211615;
        border-bottom: 1px solid #4f3b37;
    }

    .accordion-trigger:focus-visible {
        outline: 2px solid var(--color-accent);
        outline-offset: 2px;
    }

.accordion-title-group {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex-wrap: wrap;
}

.accordion-title {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
}

.accordion-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid transparent;
}

.status-valid {
    background: #e8f3df;
    color: #2f5f14;
    border-color: #bfd6ab;
}

.status-before {
    background: #fff4db;
    color: #7a5200;
    border-color: #ecd095;
}

.status-expired {
    background: #f7e4e4;
    color: #8c2f2f;
    border-color: #dfb4b4;
}

.status-used {
    background: #e4edf8;
    color: #234f84;
    border-color: #b8cde5;
}

.status-invalid {
    background: #efe7e7;
    color: #5f4b4b;
    border-color: #d4c2c2;
}

.status-default {
    background: #f3ece8;
    color: #5e4d47;
    border-color: #d9c9c2;
}

.accordion-icon {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #5a4742;
    border-radius: 999px;
    font-size: 1.15rem;
    line-height: 1;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.accordion-panel {
    padding: 0;
    border-top: 1px solid var(--color-border-light);
    background: #ffffff;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.56);
    z-index: 1040;
}

.modal-wrap {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-panel {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--color-border-light);
}

.modal-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.4;
    word-break: break-all;
}

.modal-close {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--color-text);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
}

    .modal-close:hover {
        color: var(--color-main-soft);
        background: #faf7f4;
    }

.modal-body {
    padding: 24px 20px 16px;
    text-align: center;
}

.modal-footer {
    padding: 0 20px 20px;
    text-align: center;
}

.qr-image {
    width: 100%;
    max-width: 320px;
    height: auto;
    border: 1px solid var(--color-border);
    padding: 8px;
    background: #ffffff;
    margin: 0 auto;
}

.qr-loading-message {
    margin-top: 12px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

#blazor-error-ui {
    background: #fff4ce;
    bottom: 0;
    box-shadow: 0 -1px 6px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.75rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 2000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.btn-qr {
    min-width: 200px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 18px;
    border: 1px solid #211615;
    border-radius: 8px;
    background: #211615;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(33, 22, 21, 0.18);
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

    .btn-qr:hover {
        background: #322422;
        border-color: #322422;
        box-shadow: 0 8px 18px rgba(33, 22, 21, 0.22);
    }

    .btn-qr:active {
        transform: translateY(1px);
    }

    .btn-qr:focus-visible {
        outline: 2px solid var(--color-accent);
        outline-offset: 2px;
    }

.btn-qr-icon {
    position: relative;
    width: 18px;
    height: 18px;
    display: inline-block;
    border: 2px solid #f6bf3a;
    border-radius: 2px;
    box-sizing: border-box;
}

    .btn-qr-icon::before,
    .btn-qr-icon::after {
        content: "";
        position: absolute;
        background: #f6bf3a;
    }

    .btn-qr-icon::before {
        top: 2px;
        left: 2px;
        width: 4px;
        height: 4px;
        box-shadow: 8px 0 0 #f6bf3a, 0 8px 0 #f6bf3a, 8px 8px 0 #f6bf3a;
    }

    .btn-qr-icon::after {
        right: 2px;
        bottom: 2px;
        width: 3px;
        height: 3px;
    }

.status-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 0 24px;
}

.status-box {
    width: 100%;
    max-width: 720px;
    padding: 40px 32px;
    border: 1px solid var(--color-border-light);
    border-radius: 12px;
    background: #ffffff;
    text-align: center;
    box-shadow: 0 12px 30px rgba(33, 22, 21, 0.06);
}

.status-code {
    margin-bottom: 12px;
    color: var(--color-accent);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.status-title {
    margin: 0 0 14px 0;
    color: var(--color-text);
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.4;
}

.status-description {
    margin: 0 auto 28px;
    max-width: 34rem;
    color: var(--color-text-sub);
    font-size: 1rem;
    line-height: 1.8;
}

.status-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.status-button-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 8px;
    background: var(--color-main);
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    transition: background-color 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
    box-shadow: 0 6px 16px rgba(33, 22, 21, 0.14);
}

    .status-button-primary:hover {
        background: var(--color-main-soft);
    }

    .status-button-primary:active {
        transform: translateY(1px);
    }

    .status-button-primary:focus-visible {
        outline: 2px solid var(--color-accent);
        outline-offset: 2px;
    }

.status-meta {
    margin: 0;
    color: #857974;
    font-size: 0.88rem;
    line-height: 1.7;
}

    .status-meta code {
        padding: 2px 6px;
        border-radius: 4px;
        background: #f6f3f0;
        color: var(--color-text);
        font-family: Consolas, Monaco, monospace;
        font-size: 0.85rem;
    }

@media (max-width: 767.98px) {
    .status-page {
        padding: 36px 0 12px;
    }

    .status-box {
        padding: 28px 18px;
        border-radius: 10px;
    }

    .status-title {
        font-size: 1.45rem;
    }

    .status-description {
        margin-bottom: 24px;
        font-size: 0.95rem;
    }

    .status-button-primary {
        width: 100%;
        max-width: 240px;
    }
}

@media (max-width: 767.98px) {
    .site-container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .site-logo {
        max-width: 260px;
        max-height: 72px;
    }

    .site-main {
        padding-bottom: 40px;
    }

    .page-title {
        font-size: 1.3rem;
    }

    .page-description {
        margin-bottom: 24px;
        font-size: 0.95rem;
    }

    .inquiry-form {
        max-width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
        row-gap: 8px;
        margin-bottom: 16px;
    }

    .form-label-custom {
        padding-top: 0;
        font-size: 0.96rem;
    }

    .form-action {
        padding-left: 0;
        margin-top: 14px;
    }

    .btn-search {
        width: 100%;
        max-width: 120px;
        font-size: 1.2rem;
    }

    .btn-sub {
        width: 100%;
        max-width: 180px;
    }

    .result-table th,
    .result-table td {
        font-size: 0.9rem;
        padding: 10px 12px;
    }

    .result-table th {
        width: 160px;
    }

    .accordion-trigger {
        min-height: 48px;
        padding: 12px 14px;
        font-size: 0.96rem;
    }

    .accordion-icon {
        font-size: 1.25rem;
    }

    .modal-wrap {
        align-items: flex-start;
        padding: 20px 12px;
    }

    .modal-panel {
        margin-top: 40px;
    }

    .modal-header {
        padding: 14px 16px;
    }

    .modal-body {
        padding: 20px 16px 14px;
    }

    .modal-footer {
        padding: 0 16px 16px;
    }

    .site-footer {
        font-size: 0.85rem;
    }

    .btn-qr {
        width: 100%;
        max-width: 240px;
        min-height: 46px;
        font-size: 0.96rem;
    }
}
