/* =========================
   Common Layout
========================= */
/* 日本語 */

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

body {
    font-family: sans-serif;
    margin: 0;
    padding: 0;
    background: #f7f7f7;
    color: #222;
    line-height: 1.6;
}

a {
    color: #0d6efd;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

header {
	display: flex; 
	justify-content: space-between; 
	align-items: center;
    background: #0d6efd;
    color: #fff;
    padding: 14px 16px;
    font-size: 18px;
    font-weight: bold;
}

.main-container {
    max-width: 520px;
    margin: 0 auto;
    padding: 16px;
}

.card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

footer {
    text-align: center;
    font-size: 12px;
    color: #666;
    padding: 20px 10px;
}

/* =========================
   Typography
========================= */

h1 {
    font-size: 22px;
    margin-top: 0;
    margin-bottom: 20px;
}

h2 {
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 12px;
}

p {
    margin-top: 0;
    margin-bottom: 1em;
}

/* =========================
   Form
========================= */

form {
    margin: 0;
}

.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
}

input[type="email"],
input[type="password"],
input[type="date"],
input[type="text"],
select,
textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #bbb;
    border-radius: 8px;
    background: #fff;
    color: #222;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.inline-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.sub-note {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
}

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

button,
.button-link {
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
    padding: 14px;
    font-size: 16px;
    text-align: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
}

button:hover,
.button-link:hover {
    opacity: 0.95;
    text-decoration: none;
}

.btn-primary {
    background: #0d6efd;
    color: #fff;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-success {
    background: #198754;
    color: #fff;
}

.btn-back {
    background: #6c757d;
    color: #fff;
}

.btn-submit {
    background: #0d6efd;
    color: #fff;
}

.button-secondary {
    background: #198754;
    color: #fff;
}

.button-row {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.button-row form {
    flex: 1;
    margin: 0;
}

/* =========================
   Boxes / Cards in pages
========================= */

.code-box {
    background: #f0f4f8;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

.code-label {
    font-size: 13px;
    color: #555;
    margin-bottom: 4px;
}

.code-value {
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 1px;
}

.note {
    font-size: 14px;
    color: #444;
    margin-bottom: 20px;
}

.readonly-box {
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

.section {
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}

.section h2 {
    margin-top: 0;
    margin-bottom: 12px;
}

.subtext {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
}

/* =========================
   Messages
========================= */

.message {
    padding: 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 15px;
}

.message.success {
    background: #eaf7ea;
    border: 1px solid #a7d7a7;
    color: #1d5e1d;
}

.message.error {
    background: #fff0f0;
    border: 1px solid #e0a8a8;
    color: #8a1f1f;
}

.error-box {
    background: #fff0f0;
    border: 1px solid #e0a8a8;
    color: #8a1f1f;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    font-size: 14px;
}

.mode-box {
    background: #fff8e6;
    border: 1px solid #f0d58c;
    color: #6f5400;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    font-size: 14px;
}

.info-box {
    background: #fff8e6;
    border: 1px solid #f0d58c;
    color: #6f5400;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    font-size: 14px;
}

/* =========================
   Confirm / Detail rows
========================= */

.row {
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.label {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

.value {
    font-size: 16px;
    font-weight: bold;
}

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

.mb-0 {
    margin-bottom: 0 !important;
}

.mt-16 {
    margin-top: 16px !important;
}

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

.mypage-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.mypage-header__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.mypage-header__brand-link {
    color: #1d4ed8;
    font-size: 22px;
    font-weight: 700;
    text-decoration: none;
}

.mypage-header__right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.mypage-header__email {
    font-size: 14px;
    color: #374151;
}

.mypage-header__email-label {
    font-weight: 700;
}

.mypage-header__lang {
    font-size: 13px;
}

.mypage-header__lang-link {
    color: aliceblue;
    text-decoration: none;
}

.mypage-header__lang-link.is-active {
    font-weight: 700;
    text-decoration: underline;
}

.mypage-menu {
    position: relative;
}

.mypage-menu__summary {
    list-style: none;
    cursor: pointer;
    padding: 10px 14px;
    background: #1d4ed8;
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
}

.mypage-menu__summary::-webkit-details-marker {
    display: none;
}

.mypage-menu__dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 180px;
    background: #fff;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: 8px 0;
    z-index: 100;
}

.mypage-menu__item {
    display: block;
    padding: 10px 16px;
    color: #1f2937;
    text-decoration: none;
    font-size: 14px;
}

.mypage-menu__item:hover {
    background: #f3f4f6;
}

.mypage-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 20px 56px;
}

.mypage-intro {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.mypage-page-title {
    margin: 0 0 8px;
    font-size: 30px;
    line-height: 1.4;
    color: #111827;
}

.mypage-page-description {
    margin: 0;
    color: #4b5563;
    font-size: 15px;
}

.mypage-user-box {
    min-width: 280px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
}

.mypage-user-box__label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 6px;
}

.mypage-user-box__value {
    font-size: 16px;
    color: #111827;
    font-weight: 700;
    word-break: break-word;
}

.mypage-shop-link-section {
    margin-bottom: 24px;
}

.mypage-shop-link {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 10px;
    background: #16a34a;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.mypage-shop-link:hover {
    opacity: 0.92;
}

.mypage-empty-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 28px 20px;
    color: #4b5563;
}

.mypage-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mypage-kit-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px 20px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.mypage-kit-card:hover {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.mypage-kit-card__main {
    flex: 1;
    min-width: 0;
}

.mypage-kit-card__title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.mypage-kit-card__title {
    margin: 0;
    font-size: 20px;
    color: #111827;
}

.mypage-kit-card__meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin: 0;
}

.mypage-kit-card__meta-item dt {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}

.mypage-kit-card__meta-item dd {
    margin: 0;
    font-size: 15px;
    color: #1f2937;
    font-weight: 600;
}

.mypage-kit-card__arrow {
    font-size: 28px;
    color: #9ca3af;
    line-height: 1;
}

.mypage-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.mypage-badge.is-unviewed {
    background: #fef3c7;
    color: #92400e;
}

.mypage-badge.is-viewed {
    background: #e5e7eb;
    color: #374151;
}

.mypage-badge.is-result-available {
    background: #dcfce7;
    color: #166534;
}

.mypage-badge.is-result-unavailable {
    background: #fee2e2;
    color: #991b1b;
}

.mypage-pagination {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.mypage-pagination__link {
    display: inline-block;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    text-decoration: none;
    color: #1f2937;
    font-weight: 700;
}

.mypage-pagination__current {
    font-size: 14px;
    color: #4b5563;
    font-weight: 700;
}

.mypage-subheader {
}

.mypage-subheader__inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
}

.mypage-subheader__left {
    min-height: 1px;
}

.mypage-subheader__title {
    margin: 0;
    font-size: 28px;
    line-height: 1.4;
    font-weight: 700;
    color: #1d4ed8;
    text-align: center;
}

.mypage-subheader__right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}

.mypage-lang {
    font-size: 14px;
}

.mypage-lang__link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
}

.mypage-lang__link.is-active {
    font-weight: 700;
    text-decoration: underline;
}

.mypage-lang__sep {
    margin: 0 4px;
    color: #ffffff;
}

.mypage-menu {
    position: relative;
}

.mypage-menu__toggle {
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: #1d4ed8;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    border: 1px solid #ccc;
}

.mypage-menu__toggle:hover {
    opacity: 0.92;
}

.mypage-menu__bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #ffffff;
    border-radius: 9999px;
}

.mypage-menu__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 220px;
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
    padding: 8px 0;
    z-index: 1000;
    display: none;
}

.mypage-menu.is-open .mypage-menu__panel {
    display: block;
}

.mypage-menu__item {
    display: block;
    padding: 12px 16px;
    color: #1f2937;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
}

.mypage-menu__item:hover {
    background: #f3f4f6;
}

.mypage-menu__item--danger {
    color: #b91c1c;
}

@media (max-width: 768px) {
    .mypage-subheader__inner {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "title title"
            "left right";
    }

    .mypage-subheader__title {
        grid-area: title;
        font-size: 24px;
    }

    .mypage-subheader__left {
        grid-area: left;
    }

    .mypage-subheader__right {
        grid-area: right;
    }
}

.mypage-back-link {
    display: inline-block;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #1f2937;
    text-decoration: none;
    font-weight: 700;
}

.mypage-back-link:hover {
    background: #f9fafb;
}

.result-detail-summary {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px 22px;
    margin-bottom: 24px;
}

.result-detail-summary__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.result-detail-summary__title {
    margin: 0;
    font-size: 28px;
    line-height: 1.4;
    color: #111827;
}

.result-detail-summary__badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.result-detail-summary__meta {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    margin: 0;
}

.result-detail-summary__meta-item dt {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}

.result-detail-summary__meta-item dd {
    margin: 0;
    font-size: 16px;
    color: #111827;
    font-weight: 700;
}

.result-detail-content {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 22px;
}

.result-detail-empty {
    padding: 20px 8px;
    text-align: center;
}

.result-detail-empty__message {
    margin: 0;
    color: #4b5563;
    font-size: 16px;
    line-height: 1.8;
}

.result-detail-table-wrap {
    overflow-x: auto;
}

.result-detail-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
}

.result-detail-table th,
.result-detail-table td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.result-detail-table th {
    background: #f8fafc;
    color: #374151;
    font-size: 13px;
    font-weight: 700;
}

.result-detail-table td {
    color: #111827;
    font-size: 15px;
}

.result-detail-table tbody tr:last-child td {
    border-bottom: none;
}

.mypage-form-section,
.mypage-result-section {
    display: block;
}

.mypage-form-card,
.mypage-result-card {
    max-width: 720px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 28px 24px;
}

.mypage-form-card__title,
.mypage-result-card__title {
    margin: 0 0 10px;
    font-size: 26px;
    line-height: 1.4;
    color: #111827;
}

.mypage-form-card__description,
.mypage-result-card__message {
    margin: 0 0 24px;
    color: #4b5563;
    font-size: 15px;
    line-height: 1.8;
}

.mypage-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mypage-form__group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mypage-form__label {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
}

.mypage-form__input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 16px;
    color: #111827;
    background: #fff;
}

.mypage-form__input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.mypage-form__actions,
.mypage-result-card__actions {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.mypage-primary-button {
    display: inline-block;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    background: #1d4ed8;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.mypage-primary-button:hover {
    opacity: 0.92;
}

.mypage-menu__logout-form {
    margin: 0;
}

.mypage-menu__item--button {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

/* =========================
   Responsive
========================= */
@media (max-width: 768px) {
    .mypage-form-card,
    .mypage-result-card {
        padding: 22px 16px;
    }

    .mypage-form-card__title,
    .mypage-result-card__title {
        font-size: 22px;
    }
}

/* =========================
   Responsive
========================= */
@media (max-width: 768px) {
    .result-detail-summary__title {
        font-size: 24px;
    }

    .result-detail-summary__meta {
        flex-direction: column;
        gap: 14px;
    }

    .result-detail-content,
    .result-detail-summary {
        padding: 18px 16px;
    }
}

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

@media (max-width: 768px) {
    .mypage-header__inner,
    .mypage-intro {
        flex-direction: column;
        align-items: flex-start;
    }

    .mypage-header__right {
        width: 100%;
        justify-content: space-between;
    }

    .mypage-user-box {
        width: 100%;
        min-width: auto;
    }

    .mypage-kit-card {
        align-items: flex-start;
    }

    .mypage-kit-card__arrow {
        display: none;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 12px;
    }

    .card {
        padding: 16px;
        border-radius: 10px;
    }

    h1 {
        font-size: 20px;
    }

    .code-value {
        font-size: 20px;
    }

    .button-row {
        flex-direction: column;
    }

    .inline-2 {
        grid-template-columns: 1fr;
    }
}