/* =========================================================
   common2.css
   STST アカウント基盤 共通スタイル
   対象：login / admin-login / mypage / apply / admin
========================================================= */

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

:root {
    --stst-bg: #f5f3ee;
    --stst-bg-soft: #fffdf8;
    --stst-surface: #ffffff;
    --stst-surface-warm: #fffaf0;

    --stst-text: #282828;
    --stst-text-soft: #68707a;
    --stst-text-faint: #9098a0;

    --stst-border: #e4e0d8;
    --stst-border-strong: #cbc4b7;

    --stst-charcoal: #252525;
    --stst-charcoal-soft: #3b3b3b;

    --stst-yellow: #ffcf21;
    --stst-yellow-hover: #edbc0c;
    --stst-yellow-soft: #fff2b9;

    --stst-orange: #f26a2a;
    --stst-orange-hover: #db5519;

    --stst-red: #df4e4e;
    --stst-red-hover: #c93a3a;

    --stst-green: #299d63;
    --stst-green-soft: #e9f7ef;

    --stst-blue: #3c8ed9;
    --stst-blue-soft: #eaf4ff;

    --shadow-sm: 0 3px 10px rgba(50, 40, 20, 0.06);
    --shadow-md: 0 12px 32px rgba(50, 40, 20, 0.1);
    --shadow-lg: 0 22px 55px rgba(50, 40, 20, 0.16);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
}

html {
    min-height: 100%;
    background: var(--stst-bg);
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--stst-text);
    background:
        radial-gradient(circle at top right,
            rgba(255, 207, 33, 0.18),
            transparent 30%),
        linear-gradient(180deg, #fffdf8 0%, var(--stst-bg) 42%, #efede7 100%);
    font-family:
        "Hiragino Kaku Gothic ProN",
        "Hiragino Sans",
        "Yu Gothic",
        "YuGothic",
        "Meiryo",
        sans-serif;
    line-height: 1.65;
    overflow-x: hidden;
}

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

button {
    appearance: none;
}

a {
    color: inherit;
    text-decoration-color: rgba(242, 106, 42, 0.55);
    text-underline-offset: 0.18em;
    transition:
        color 0.18s ease,
        opacity 0.18s ease;
}

a:hover {
    color: var(--stst-orange);
}

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

/* =========================================================
   Layout
========================================================= */

main {
    width: min(1080px, calc(100% - 40px));
    margin: 0 auto;
    padding: 52px 0 72px;
}

main>h1:first-child {
    position: relative;
    margin: 0 0 34px;
    padding-bottom: 16px;
    color: var(--stst-charcoal);
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    font-weight: 800;
    letter-spacing: 0.03em;
    line-height: 1.3;
}

main>h1:first-child::after {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 84px;
    height: 7px;
    border-radius: 999px;
    background: linear-gradient(90deg,
            var(--stst-yellow) 0%,
            #ffdf53 100%);
    content: "";
}

main>p:first-of-type {
    max-width: 760px;
    margin: -18px 0 32px;
    color: var(--stst-text-soft);
}

/* =========================================================
   Headings / Text
========================================================= */

h1,
h2,
h3,
h4,
p {
    margin-top: 0;
}

h2 {
    margin-bottom: 18px;
    color: var(--stst-charcoal);
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.45;
}

h3 {
    margin-bottom: 12px;
    color: var(--stst-charcoal);
    font-size: 1.05rem;
    font-weight: 800;
}

p {
    color: var(--stst-text-soft);
}

small,
.small-text {
    color: var(--stst-text-faint);
    font-size: 0.86rem;
}

strong {
    color: var(--stst-text);
}

/* =========================================================
   Card / Section
========================================================= */

section,
.card {
    position: relative;
    margin-bottom: 22px;
    padding: 26px;
    border: 1px solid var(--stst-border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
}

section>h2:first-child,
.card>h2:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
}

section>h2:first-child::before,
.card>h2:first-child::before {
    width: 7px;
    height: 1.15em;
    border-radius: 999px;
    background: var(--stst-yellow);
    content: "";
    flex: 0 0 auto;
}

section p:last-child,
.card p:last-child {
    margin-bottom: 0;
}

/* =========================================================
   Forms
========================================================= */

form {
    display: grid;
    gap: 18px;
}

label {
    display: grid;
    gap: 7px;
    color: var(--stst-text);
    font-size: 0.94rem;
    font-weight: 700;
}

input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
    width: 100%;
    border: 1px solid var(--stst-border-strong);
    border-radius: var(--radius-sm);
    outline: none;
    background: #fff;
    color: var(--stst-text);
    padding: 11px 13px;
    line-height: 1.5;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background-color 0.18s ease;
}

input:not([type="checkbox"]):not([type="radio"])::placeholder,
textarea::placeholder {
    color: #a4a9ae;
}

input:not([type="checkbox"]):not([type="radio"]):focus,
textarea:focus,
select:focus {
    border-color: var(--stst-orange);
    background: #fffdf8;
    box-shadow: 0 0 0 4px rgba(242, 106, 42, 0.13);
}

input[type="file"] {
    width: 100%;
    border: 1px dashed var(--stst-border-strong);
    border-radius: var(--radius-sm);
    background: var(--stst-surface-warm);
    color: var(--stst-text-soft);
    padding: 10px;
}

input[type="file"]::file-selector-button {
    margin-right: 10px;
    border: 0;
    border-radius: 7px;
    background: var(--stst-charcoal);
    color: #fff;
    padding: 7px 11px;
    cursor: pointer;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

label:has(input[type="checkbox"]),
label:has(input[type="radio"]) {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    font-weight: 600;
}

input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--stst-orange);
    cursor: pointer;
}

/* =========================================================
   Buttons
========================================================= */

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--stst-yellow);
    color: var(--stst-charcoal);
    padding: 10px 18px;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 3px 0 rgba(130, 95, 0, 0.15);
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease,
        background-color 0.16s ease,
        opacity 0.16s ease;
}

button:hover,
.button:hover {
    color: var(--stst-charcoal);
    background: var(--stst-yellow-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 0 rgba(130, 95, 0, 0.15);
}

button:active,
.button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 rgba(130, 95, 0, 0.15);
}

button:focus-visible,
.button:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(242, 106, 42, 0.45);
    outline-offset: 3px;
}

button:disabled,
.button.is-disabled,
.button[aria-disabled="true"] {
    background: #d4d0c7;
    color: #85817a;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
    box-shadow: none;
    opacity: 0.85;
}

.button-secondary,
button.secondary {
    border-color: var(--stst-border-strong);
    background: #fff;
    color: var(--stst-charcoal);
    box-shadow: none;
}

.button-secondary:hover,
button.secondary:hover {
    border-color: var(--stst-charcoal);
    background: #f7f6f3;
}

.button-orange,
button.orange {
    background: var(--stst-orange);
    color: #fff;
    box-shadow: 0 3px 0 rgba(145, 54, 13, 0.18);
}

.button-orange:hover,
button.orange:hover {
    background: var(--stst-orange-hover);
    color: #fff;
}

.button-danger,
button.danger {
    background: var(--stst-red);
    color: #fff;
    box-shadow: 0 3px 0 rgba(123, 30, 30, 0.16);
}

.button-danger:hover,
button.danger:hover {
    background: var(--stst-red-hover);
    color: #fff;
}

.button-success,
button.success {
    background: var(--stst-green);
    color: #fff;
    box-shadow: 0 3px 0 rgba(20, 95, 55, 0.16);
}

.button-success:hover,
button.success:hover {
    background: #208451;
    color: #fff;
}

/* =========================================================
   Status / Message
========================================================= */

#loginMessage,
#applyMessage {
    min-height: 1.7em;
    margin: 2px 0 0;
    border-radius: var(--radius-sm);
    color: var(--stst-text-soft);
    font-size: 0.93rem;
    font-weight: 700;
}

.status-badge,
.badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border-radius: 999px;
    background: var(--stst-yellow-soft);
    color: #785800;
    padding: 3px 10px;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.2;
}

.badge-success {
    background: var(--stst-green-soft);
    color: #167041;
}

.badge-danger {
    background: #fde9e9;
    color: #b52d2d;
}

.badge-info {
    background: var(--stst-blue-soft);
    color: #256eaf;
}

.notice,
.alert {
    margin: 16px 0;
    border: 1px solid #f0d584;
    border-radius: var(--radius-sm);
    background: #fff8dd;
    color: #765806;
    padding: 13px 15px;
    font-size: 0.93rem;
}

.alert-danger {
    border-color: #f3bcbc;
    background: #fff0f0;
    color: #a62e2e;
}

.alert-success {
    border-color: #b8e1c9;
    background: var(--stst-green-soft);
    color: #1e7a49;
}

/* =========================================================
   Lists / Tables
========================================================= */

ul,
ol {
    padding-left: 1.35em;
}

li+li {
    margin-top: 0.4em;
}

table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border: 1px solid var(--stst-border);
    border-radius: var(--radius-sm);
    background: #fff;
}

th,
td {
    border-bottom: 1px solid var(--stst-border);
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
}

th {
    background: var(--stst-charcoal);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 800;
}

td {
    color: var(--stst-text-soft);
}

tr:last-child td {
    border-bottom: 0;
}

/* =========================================================
   Header / Footer
   将来的にアカウント基盤へ追加した時の共通スタイル
========================================================= */

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    border-bottom: 3px solid var(--stst-yellow);
    background: var(--stst-charcoal);
    color: #fff;
    padding: 10px clamp(16px, 4vw, 40px);
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.header-link a {
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
}

.header-link a:hover {
    color: var(--stst-yellow);
}

.logo-img {
    width: auto;
    height: 42px;
}

.footer {
    margin-top: auto;
    border-top: 3px solid var(--stst-yellow);
    background: var(--stst-charcoal);
    color: rgba(255, 255, 255, 0.82);
    padding: 20px 16px;
    font-size: 0.82rem;
    text-align: center;
}

.footer-text {
    width: min(1080px, 100%);
    margin: 0 auto;
}

.footer a {
    color: inherit;
}

/* =========================================================
   Modal
========================================================= */

.modal-overlay {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(22, 22, 22, 0.62);
    padding: 20px;
}

.modal-overlay.hidden {
    display: none;
}

.modal {
    width: min(760px, 100%);
    max-height: min(82vh, 900px);
    overflow: auto;
    border: 1px solid var(--stst-border);
    border-radius: var(--radius-lg);
    background: #fff;
    padding: 28px;
    box-shadow: var(--shadow-lg);
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--stst-border);
}

/* =========================================================
   Utility
========================================================= */

.hidden {
    display: none !important;
}

.text-muted {
    color: var(--stst-text-soft) !important;
}

.text-danger {
    color: var(--stst-red) !important;
}

.text-success {
    color: var(--stst-green) !important;
}

.text-center {
    text-align: center !important;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}

/* =========================================================
   Responsive
========================================================= */

@media (max-width: 720px) {
    main {
        width: min(100% - 24px, 1080px);
        padding: 32px 0 52px;
    }

    main>h1:first-child {
        margin-bottom: 26px;
        padding-bottom: 13px;
        font-size: 1.65rem;
    }

    main>h1:first-child::after {
        width: 68px;
        height: 6px;
    }

    main>p:first-of-type {
        margin: -12px 0 24px;
        font-size: 0.93rem;
    }

    section,
    .card {
        margin-bottom: 16px;
        padding: 18px;
        border-radius: 14px;
    }

    h2 {
        margin-bottom: 14px;
        font-size: 1.08rem;
    }

    .header {
        min-height: 58px;
        padding: 8px 14px;
    }

    .header-left,
    .header-right {
        gap: 10px;
    }

    .logo-img {
        height: 30px;
    }

    .header-link a {
        font-size: 0.78rem;
    }

    .modal {
        max-height: 88vh;
        padding: 20px;
        border-radius: 16px;
    }

    .modal-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .modal-actions button {
        width: 100%;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}