/*
 * TigersLog 共通スタイル
 * 色・サイズは Figma（SP画面）の値に合わせている
 *   背景 #111111 ／ 黄 #ffd400 ／ 文字 #1a1a1a ／ 赤 #c62828 ／ リンク #1565c0 ／ 画面の地 #f4f3ee
 */

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

body {
    margin: 0;
    background: #111111;
    color: #1a1a1a;
    font-family: "Noto Sans JP", "Noto Sans CJK JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
    font-size: 14px;
    line-height: 22px;
    -webkit-text-size-adjust: 100%;
}

p {
    margin: 0;
}

a {
    color: #1565c0;
}

[hidden] {
    display: none !important;
}

.muted {
    color: #666666;
}

.small {
    font-size: 12px;
    line-height: 18px;
}

/* ================================================================
   認証画面（G1-1〜G1-4）の外枠
   ================================================================ */

.auth-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    min-height: 100vh;
    padding: 64px 16px calc(110px + env(safe-area-inset-bottom));
    border-bottom: 6px solid #ffd400; /* 画面下の黄色いライン */
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.brand-logo {
    display: block;
    width: 326px;
    max-width: 100%;
    height: auto;
}

.brand-tagline {
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    line-height: 18px;
}

/* ================================================================
   ログイン後のユーザー画面（SP）：ヘッダー・本文・タブバー
   ================================================================ */

.app {
    background: #f4f3ee;
}

.sp-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
    background: #111111;
    border-bottom: 3px solid #ffd400;
}

.sp-header-logo img {
    display: block;
    width: 131px;
    height: auto;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: -8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
}

.sp-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 18px max(16px, env(safe-area-inset-right)) calc(170px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); /* 下はタブバーとマスコットの分あける */
}

.page-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 32px;
}

.page-title::before {
    content: "";
    flex: none;
    width: 5px;
    height: 22px;
    background: #ffd400;
}

.tabbar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    display: flex;
    justify-content: center;
    padding: 0 8px max(14px, env(safe-area-inset-bottom)); /* iPhone の下のバー（ホームインジケータ）に重ならないように */
    background: #111111;
    border-top: 1px solid #404040;
}

.tab {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    max-width: 120px;
    padding: 8px 0 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    line-height: 14px;
    text-decoration: none;
}

.tab-label {
    color: #ffffff;
}

.tab.is-active,
.tab.is-active .tab-label {
    color: #ffd400;
    font-weight: 700;
}

/* ---------- メニュー（ヘッダーの人のアイコン） ---------- */

.overlay {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(0, 0, 0, 0.45);
}

.menu-panel {
    position: fixed;
    top: 64px;
    right: 16px;
    z-index: 41;
    width: 320px;
    max-width: calc(100% - 32px);
    overflow: hidden;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.menu-user {
    padding: 16px 20px;
    background: #111111;
}

.menu-user-name {
    color: #ffffff;
    font-weight: 700;
}

.menu-user-email {
    color: #ffd400;
    font-size: 12px;
    line-height: 18px;
    word-break: break-all;
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 20px;
    border: 0;
    border-top: 1px solid #e5e5e5;
    background: #ffffff;
    color: #1a1a1a;
    font: inherit;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.menu-item-arrow {
    color: #666666;
}

.menu-item-danger {
    color: #c62828;
}

.menu-item-muted {
    color: #666666;
    font-weight: 400;
}

/* ---------- マスコット（トラログくん）：全画面の右下 ---------- */

.mascot {
    position: fixed;
    right: 8px;
    bottom: calc(66px + max(14px, env(safe-area-inset-bottom)));
    z-index: 15;
    display: flex;
    align-items: center;
    gap: 4px;
    pointer-events: none; /* 下のボタンを押せるようにする */
}

.mascot-auth {
    bottom: calc(14px + env(safe-area-inset-bottom));
}

.mascot-bubble {
    padding: 6px 10px;
    border: 2px solid #111111;
    border-radius: 14px;
    background: #ffffff;
    color: #111111;
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
    white-space: nowrap;
}

.mascot-img {
    display: block;
    width: 80px;
    height: 80px;
}

/* スマホ・タブレット：下の方の文字が隠れないように、吹き出しは4秒で消し、スクロール中は薄くする（PCは本文の外にいるのでそのまま） */
@media (max-width: 1023px) {
    .mascot {
        transition: opacity 0.2s ease;
    }

    .mascot.is-scrolling {
        opacity: 0.25;
    }

    .mascot-bubble {
        animation: mascot-bubble-hide 0.4s ease 4s forwards;
    }
}

@keyframes mascot-bubble-hide {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mascot {
        transition: none;
    }

    .mascot-bubble {
        animation-duration: 0.01s;
    }
}

/* ================================================================
   カード・メッセージ
   ================================================================ */

.card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 400px;
    padding: 22px 20px;
    background: #ffffff;
    border-radius: 12px;
}

.sp-main .card {
    max-width: none;
    padding: 18px 16px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
}

.card-title::before {
    content: "";
    flex: none;
    width: 5px;
    height: 22px;
    background: #ffd400;
}

.lead {
    color: #666666;
}

.alert {
    padding: 9px 14px;
    border-radius: 6px;
}

.alert-error {
    background: #fdecea;
    color: #c62828;
}

.alert-success {
    background: #e8f5e9;
    border: 1px solid #81c784;
    color: #1b5e20;
}

/* ================================================================
   フォーム
   ================================================================ */

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

.field {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.field-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 6px;
    padding: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 20px;
}

.tag-required,
.tag-optional {
    padding: 0 5px;
    border-radius: 3px;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
}

.tag-required {
    background: #c62828;
}

.tag-optional {
    background: #666666;
}

.input {
    display: block;
    width: 100%;
    height: 40px;
    padding: 9px 12px;
    border: 1px solid #bbbbbb;
    border-radius: 6px;
    background: #ffffff;
    color: #1a1a1a;
    font: inherit;
}

.input::placeholder {
    color: #666666;
}

.input:focus {
    outline: 2px solid #ffd400;
    outline-offset: 1px;
    border-color: #1a1a1a;
}

.input:disabled {
    background: #f0efea;
    color: #999999;
}

.input.is-invalid {
    border-color: #c62828;
}

select.input {
    padding-right: 36px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23555555' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-position: right 13px center;
    background-repeat: no-repeat;
}

textarea.input {
    height: 100px;
    resize: vertical;
}

.field-error {
    margin-top: 6px;
    color: #c62828;
    font-size: 12px;
    line-height: 18px;
}

.field-note {
    margin-top: 4px;
    color: #666666;
    font-size: 12px;
    line-height: 18px;
    text-align: right;
}

.choices {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    padding: 6px 0;
}

.choice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.choice input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #111111;
}

.choices.is-invalid .choice {
    color: #c62828;
}

.score-inputs {
    display: flex;
    align-items: center;
    gap: 14px;
}

.score-inputs .input {
    width: 64px;
    text-align: center;
}

.lookup-info {
    padding: 9px 14px;
    border: 1px solid #81c784;
    border-radius: 6px;
    background: #e8f5e9;
    color: #1b5e20;
}

.lookup-info.is-blocked {
    border-color: #ef9a9a;
    background: #fdecea;
    color: #c62828;
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    line-height: 18px;
    cursor: pointer;
}

.checkbox input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #111111;
}

/* ================================================================
   ボタン・リンク
   ================================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 8px 20px;
    border: 0;
    border-radius: 6px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary {
    width: 100%;
    background: #ffd400;
    color: #111111;
}

.btn-primary:hover {
    background: #ffdf33;
}

.btn-secondary {
    width: 100%;
    background: #e3e2dc;
    color: #1a1a1a;
}

.btn-dark {
    background: #111111;
    color: #ffd400;
}

.btn-danger {
    background: #c62828;
    color: #ffffff;
}

.btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.btn-row {
    display: flex;
    gap: 10px;
}

.btn-row .btn {
    flex: 1;
}

.links {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    line-height: 18px;
}

.links-center {
    justify-content: center;
}

.back-link {
    align-self: flex-start;
    color: #666666;
    font-size: 13px;
    font-weight: 700;
    line-height: 20px;
    text-decoration: none;
}

/* ================================================================
   観戦記録（G3-1・G3-4）
   ================================================================ */

.btn-filter {
    height: 26px;
    padding: 4px 12px;
    border: 0;
    border-radius: 6px;
    background: #111111;
    color: #ffd400;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    cursor: pointer;
}

.chips {
    display: flex;
    gap: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 6px 12px;
    border: 1px solid #bbbbbb;
    border-radius: 999px;
    background: #ffffff;
    color: #1a1a1a;
    font-size: 12px;
    line-height: 18px;
    text-decoration: none;
}

.chip.is-active {
    border-color: #111111;
    background: #111111;
    color: #ffd400;
    font-size: 13px;
    font-weight: 700;
}

.summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.summary strong {
    font-weight: 700;
}

.record-list {
    margin: 0;
    padding: 0;
    overflow: hidden;
    list-style: none;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.record-list li + li {
    border-top: 1px solid #e5e5e5;
}

.record-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: inherit;
    text-decoration: none;
}

.record-main {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.record-date {
    color: #666666;
    font-size: 12px;
    line-height: 18px;
}

.record-team {
    overflow: hidden;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis; /* 一覧は末尾を「…」で省略 */
}

.record-result {
    display: flex;
    align-items: center;
    gap: 6px;
}

.record-score {
    min-width: 30px;
    font-weight: 700;
}

.record-arrow {
    color: #999999;
    font-size: 18px;
}

.empty {
    padding: 28px 16px;
    background: #ffffff;
    border-radius: 10px;
    color: #666666;
    text-align: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
}

.badge-win {
    background: #ffd400;
    color: #111111;
}

.badge-lose {
    background: #333333;
    color: #ffffff;
}

.badge-draw {
    background: #bbbbbb;
    color: #111111;
}

.badge-lg {
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 16px;
    line-height: 24px;
}

.watch-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px; /* 現地／TV で幅をそろえ、一覧の並びをそろえる */
    height: 20px;
    padding: 0 8px;
    border: 1px solid #666666;
    border-radius: 10px;
    font-size: 12px;
    line-height: 18px;
    white-space: nowrap;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 6px 10px;
    border-radius: 6px;
    background: #ffffff;
    color: #1a1a1a;
    font-size: 13px;
    font-weight: 700;
    line-height: 20px;
    text-decoration: none;
}

.page-current {
    background: #111111;
    color: #ffd400;
}

.page-disabled {
    color: #bbbbbb;
}

/* 絞り込み条件パネル（画面下から出る） */
.sheet {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 41;
    max-width: 600px;
    margin: 0 auto;
    padding: 14px 16px calc(24px + env(safe-area-inset-bottom));
    background: #ffffff;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.2);
}

.sheet .form {
    gap: 12px;
}

.sheet-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
}

.sheet .field-label {
    margin-bottom: 4px;
}

/* 観戦記録詳細 */
.detail-date {
    color: #666666;
}

.detail-score {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.detail-score-text {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 32px;
}

.detail-rows {
    margin: 0;
}

.detail-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0;
    border-bottom: 1px solid #e5e5e5;
}

.detail-row:first-child {
    border-top: 1px solid #e5e5e5;
}

.detail-row dt {
    color: #666666;
    font-size: 12px;
    line-height: 18px;
}

.detail-row dd {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    overflow-wrap: anywhere; /* 詳細は折り返して全文表示 */
}

/* 確認ダイアログ */
.dialog {
    width: 340px;
    max-width: calc(100% - 32px);
    padding: 20px;
    border: 0;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.dialog::backdrop {
    background: rgba(0, 0, 0, 0.45);
}

.dialog-title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
}

.dialog-text {
    margin-bottom: 12px;
    color: #666666;
}

.dialog .btn-row {
    gap: 8px;
}

/* ログアウトボタン（PCのヘッダー・管理画面のヘッダー） */
.btn-logout {
    height: 30px;
    padding: 4px 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #ffffff;
    font-size: 12px;
    font-weight: 400;
}

.btn-logout:hover {
    border-color: #ffffff;
}

/* ================================================================
   ホーム（G2-0）・ダッシュボード（G2-1）
   ================================================================ */

/* 画面には出さず、読み上げソフトにだけ伝える */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.hero {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    background: #111111;
    border-radius: 16px;
}

.hero-date {
    color: #ffd400;
    font-size: 13px;
    font-weight: 700;
    line-height: 20px;
}

.hero-greeting {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    line-height: 32px;
    overflow-wrap: anywhere;
}

.hero-season {
    color: #ffffff;
    font-size: 12px;
    line-height: 18px;
}

.next-game {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: #ffffff;
    border: 3px solid #ffd400;
    border-radius: 12px;
}

.next-game-head {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666666;
    font-size: 13px;
    font-weight: 700;
    line-height: 20px;
}

.next-game-when {
    font-size: 22px;
    font-weight: 700;
    line-height: 32px;
}

.next-game-team {
    font-weight: 700;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    white-space: nowrap;
}

.status-scheduled {
    background: #e3f2fd;
    color: #1565c0;
}

.status-finished {
    background: #eeeeee;
    color: #333333;
}

.status-canceled {
    background: #fdecea;
    color: #c62828;
}

.status-postponed {
    background: #fff3e0;
    color: #bf4000; /* 背景との差 4.85:1（文字の見やすさの基準 4.5:1 以上） */
}

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

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 0;
    padding: 18px 16px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.stat-card-compact {
    padding: 12px 16px;
}

.stat-label {
    margin: 0;
    color: #666666;
    font-size: 12px;
    font-weight: 400;
    line-height: 18px;
}

.stat-label-strong {
    font-size: 13px;
    font-weight: 700;
    line-height: 20px;
}

.stat-value {
    font-size: 34px;
    font-weight: 700;
    line-height: 44px;
}

.stat-sub {
    color: #666666;
    font-size: 12px;
    line-height: 18px;
}

.results-card {
    gap: 10px;
}

.results-row {
    display: flex;
    gap: 6px;
}

.list-card {
    overflow: hidden;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px 6px;
}

.card-heading {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
}

.card-link {
    font-size: 12px;
    line-height: 18px;
    text-decoration: none;
    white-space: nowrap;
}

.card-link-end {
    align-self: flex-end;
}

.record-list-flat {
    border-radius: 0;
    box-shadow: none;
}

.record-list-flat li {
    border-top: 1px solid #e5e5e5;
}

.list-empty {
    padding: 16px 14px 20px;
    color: #666666;
}

.schedule {
    margin: 0;
    padding: 0;
    list-style: none;
}

.schedule-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e5e5e5;
}

.schedule-date {
    flex: none;
    width: 84px;
    font-size: 13px;
    font-weight: 700;
    line-height: 22px;
}

.schedule-info {
    flex: 1;
    min-width: 0;
}

.schedule-match {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.schedule-note {
    color: #666666;
    font-size: 12px;
    line-height: 18px;
}

.schedule-note-stop {
    color: #c62828;
}

.season-select {
    width: 120px;
}

.team-table {
    width: 100%;
    border-collapse: collapse;
}

.team-table tr {
    border-bottom: 1px solid #e5e5e5;
}

.team-table th,
.team-table td {
    padding: 6px 0 6px 8px;
    white-space: nowrap;
}

.team-table .team-name {
    width: 100%;
    padding-left: 0;
    overflow: hidden;
    font-size: 13px;
    font-weight: 700;
    line-height: 20px;
    text-align: left;
    text-overflow: ellipsis;
}

.team-rate {
    font-size: 13px;
    font-weight: 700;
    line-height: 20px;
    text-align: right;
}

/* ================================================================
   観戦カレンダー（G3-2）・試合日程・結果（G3-6）
   ================================================================ */

.month-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.month-label {
    flex: 1;
    font-size: 18px;
    font-weight: 700;
    line-height: 24px;
    text-align: center;
}

.month-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 26px;
    padding: 4px 10px;
    border-radius: 6px;
    background: #e3e2dc;
    color: #1a1a1a;
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    text-decoration: none;
}

.month-btn-today {
    padding: 4px 12px;
    background: #111111;
    color: #ffd400;
}

.month-summary {
    font-size: 13px;
    font-weight: 700;
    line-height: 20px;
}

.month-summary-sep {
    margin: 0 6px;
    color: #999999;
    font-weight: 400;
}

.calendar {
    width: 100%;
    overflow: hidden;
    border-collapse: collapse;
    table-layout: fixed;
    background: #ffffff;
    border-radius: 8px;
}

.calendar th {
    padding: 5px 0;
    background: #111111;
    color: #ffd400;
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.calendar-day {
    height: 64px;
    padding: 0;
    border: 0.5px solid #e5e5e5;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
    vertical-align: top;
}

.calendar-day.is-outside {
    background: #f4f3ee;
}

.calendar-day.is-sunday .calendar-num {
    color: #c62828;
}

.calendar-day.is-saturday .calendar-num {
    color: #1565c0;
}

.calendar-day.is-today .calendar-num {
    display: inline-block;
    min-width: 22px;
    border-radius: 11px;
    background: #111111;
    color: #ffd400;
    font-weight: 700;
}

.calendar-day.is-logged {
    background: #fff8cc; /* 観戦記録がある日 */
}

.calendar-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    height: 100%;
    min-height: 64px;
    padding-top: 4px;
    color: #1a1a1a;
    text-decoration: none;
}

.calendar-link.is-static .calendar-num {
    color: #767676; /* タップできない日（未来の日）。少し薄く、でも読める濃さ（4.5:1） */
}

.calendar-check {
    margin-left: 1px;
    color: #111111;
    font-size: 9px;
    font-weight: 700;
}

/* 相手：スマホは1〜2文字（巨・De）、PCは略称（巨人・DeNA） */
.calendar-team {
    color: #111111;
    font-size: 11px;
    font-weight: 700;
    line-height: 14px;
}

.calendar-team-full {
    display: none;
}

/* 終わった試合のスコア（勝＝黄／負＝黒／分＝灰） */
.calendar-score {
    display: inline-block;
    padding: 0 4px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
    white-space: nowrap;
}

.calendar-score-win {
    background: #ffd400;
    color: #111111;
}

.calendar-score-lose {
    background: #333333;
    color: #ffffff;
}

.calendar-score-draw {
    background: #bbbbbb;
    color: #111111;
}

/* 予定の開始時刻・中止・延期 */
.calendar-note {
    color: #666666;
    font-size: 10px;
    line-height: 14px;
}

.calendar-note-canceled {
    color: #c62828;
    font-weight: 700;
}

.calendar-note-postponed {
    color: #bf4000;
    font-weight: 700;
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
}

.calendar-legend-logged {
    display: inline-block;
    padding: 0 4px;
    border: 1px solid #e5d98a;
    border-radius: 3px;
    background: #fff8cc;
    color: #111111;
    font-weight: 700;
}

.game-list {
    margin: 0;
    padding: 0;
    overflow: hidden;
    list-style: none;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.game-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
}

.game-row + .game-row {
    border-top: 1px solid #e5e5e5;
}

.game-date {
    display: flex;
    flex: none;
    flex-direction: column;
    width: 78px;
}

.game-date-day {
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
}

.game-date-sub {
    color: #666666;
    font-size: 12px;
    line-height: 18px;
}

.game-info {
    flex: 1;
    min-width: 0;
}

/* 相手と球場は、入りきらなければ球場を次の行へ送る（それでも長い部分は末尾を「…」で省略） */
.game-match {
    display: flex;
    flex-wrap: wrap;
    column-gap: 1em;
    font-weight: 700;
}

.game-match-part {
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.game-side {
    display: flex;
    flex: none;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.game-done {
    font-size: 12px;
    line-height: 18px;
    text-decoration: none;
    white-space: nowrap;
}

.btn-small {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 4px 12px;
    border-radius: 6px;
    background: #ffd400;
    color: #111111;
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    text-decoration: none;
    white-space: nowrap;
}


/* 今年の阪神の成績（G2-0 ⑫・G3-6） */
.team-record {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
    padding: 8px 12px;
    border-left: 4px solid #ffd400;
    border-radius: 4px;
    background: #111111;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    line-height: 20px;
}

.team-record-label {
    color: #ffd400;
    font-size: 12px;
}

/* ================================================================
   マイページ（G5-1）・アカウント設定（G5-2）・エラー（G9-1）
   ================================================================ */

.profile-card {
    align-items: center;
    gap: 10px;
    text-align: center;
}

.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border: 3px solid #111111;
    border-radius: 50%;
    background: #ffd400;
    color: #111111;
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
}

.profile-text {
    min-width: 0;
    max-width: 100%;
}

.profile-name {
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    overflow-wrap: anywhere; /* カードは折り返して全文表示 */
}

.profile-email {
    color: #666666;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.oshi-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 4px 14px;
    border-radius: 16px;
    background: #111111;
    color: #ffffff;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.oshi-label {
    flex: none;
    color: #ffd400;
    font-size: 12px;
}

.profile-card .btn {
    margin-top: 4px;
}

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

.tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 0;
    padding: 14px 8px;
    border-radius: 8px;
    background: #f0efea;
    text-align: center;
}

.tile-value {
    font-size: 30px;
    font-weight: 700;
    line-height: 40px;
}

.tile-value-text {
    max-width: 100%;
    overflow: hidden;
    font-size: 26px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.highlight-rows {
    margin: 0;
}

.highlight-row {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e5e5e5;
}

.highlight-row:first-child {
    border-top: 1px solid #e5e5e5;
}

.highlight-row dt {
    flex: none;
    width: 96px;
    color: #666666;
    font-size: 12px;
    line-height: 20px;
}

.highlight-row dd {
    min-width: 0;
    margin: 0;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.menu-list .menu-item:first-child {
    border-top: 0;
}

.mypage-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.withdraw-heading {
    color: #c62828;
}

.btn-block {
    width: 100%;
}

.dialog .form {
    gap: 12px;
}

/* G9-1 エラー */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 72px 8px;
    text-align: center;
}

.error-code {
    font-size: 96px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 2px;
}

.error-code::after {
    content: "";
    display: block;
    width: 80px;
    height: 6px;
    margin: 20px auto 0;
    border-radius: 3px;
    background: #ffd400;
}

.error-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 32px;
}

.error-text {
    max-width: 320px;
    color: #666666;
}

.error-page .btn {
    width: auto;
    min-width: 128px;
    margin-top: 6px;
}

/* 未ログインのエラー画面：ヘッダーはロゴだけ */
.guest-main {
    padding-bottom: 120px;
}

/* ================================================================
   PC表示（ユーザー画面）
   スマホ用のデザインを基本にして、幅1024px以上のときだけ並べ方を変える
     ・ヘッダーに画面への移動・「観戦を記録する」・ユーザー名（→ マイページ）・ログアウトを出す
     ・画面下のタブバーは出さない（右上のメニューも使わない）
     ・本文を広げて、カードを左右2列に並べる
   ================================================================ */

/* スマホでは出さない（PCのヘッダーの中身） */
.pc-nav,
.pc-user {
    display: none;
}

/* 左右2列の入れ物。スマホでは縦に並べるだけ（見た目は変わらない） */
.pc-columns,
.pc-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

@media (min-width: 1024px) {
    /* ---------- ヘッダー ---------- */
    .sp-header {
        gap: 24px;
        height: 60px;
        padding: 0 24px;
    }

    .sp-header .icon-button,
    #app-menu {
        display: none !important;
    }

    .pc-nav {
        display: flex;
        align-self: stretch;
        gap: 20px;
    }

    .pc-nav-link {
        display: flex;
        align-items: center;
        border-bottom: 3px solid transparent;
        margin-bottom: -3px; /* ヘッダー下の黄色い線に重ねる */
        color: rgba(255, 255, 255, 0.8);
        font-size: 14px;
        font-weight: 700;
        text-decoration: none;
        white-space: nowrap;
    }

    .pc-nav-link:hover {
        color: #ffffff;
    }

    .pc-nav-link.is-active {
        border-bottom-color: #ffd400;
        color: #ffd400;
    }

    .pc-user {
        display: flex;
        align-items: center;
        gap: 16px;
        margin-left: auto;
    }

    .pc-create {
        display: inline-flex;
        align-items: center;
        height: 34px;
        padding: 6px 16px;
        border-radius: 6px;
        background: #ffd400;
        color: #111111;
        font-size: 13px;
        font-weight: 700;
        text-decoration: none;
        white-space: nowrap;
    }

    .pc-create:hover {
        background: #ffdf33;
    }

    .pc-create.is-active {
        box-shadow: 0 0 0 2px #111111, 0 0 0 4px #ffd400;
    }

    .pc-user-name {
        max-width: 140px;
        overflow: hidden;
        color: #ffffff;
        font-size: 13px;
        text-decoration: none;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .pc-user-name:hover {
        text-decoration: underline;
    }

    .pc-user-name.is-active {
        color: #ffd400;
        font-weight: 700;
    }

    .pc-user .btn-logout {
        white-space: nowrap;
    }

    /* ---------- タブバー・マスコット ---------- */
    .tabbar {
        display: none;
    }

    /* 本文の右の余白に収まるよう、吹き出しはマスコットの上に出す */
    .mascot {
        right: 24px;
        bottom: 24px;
        flex-direction: column;
        align-items: flex-end;
        gap: 6px;
    }

    /* ---------- 本文 ---------- */
    .sp-main {
        gap: 20px;
        max-width: 1120px;
        padding: 32px 32px 140px; /* 下はマスコットの分あける */
    }

    .sp-main.layout-medium {
        max-width: 880px;  /* 試合日程 */
    }

    .sp-main.layout-narrow {
        max-width: 720px;  /* 登録・編集・詳細 */
    }

    .page-title {
        font-size: 22px;
    }

    .pc-columns {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: start;
        gap: 20px;
    }

    /* G5-1：左にプロフィールとメニュー、右に観戦データとハイライト */
    .mypage-grid {
        display: grid;
        grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
        align-items: start;
        gap: 20px;
    }

    .mp-profile { grid-area: 1 / 1; }
    .mp-menu { grid-area: 2 / 1; }
    .mp-data { grid-area: 1 / 2; }
    .mp-highlights { grid-area: 2 / 2; }

    /* G2-1：成績4つを横1列に */
    .stat-grid-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .btn-pc-auto {
        align-self: flex-end;
        width: auto;
        padding: 8px 32px;
    }

    /* G3-1：左に絞り込み条件（常に表示）、右に一覧 */
    .pc-columns-list {
        grid-template-columns: 260px minmax(0, 1fr);
        grid-template-areas: "filter main";
    }

    .list-main {
        grid-area: main;
    }

    .filter-sheet {
        grid-area: filter;
        position: sticky;
        top: 84px;
    }

    .filter-sheet[hidden] {
        display: block !important; /* JavaScript が無くても出す */
    }

    .filter-sheet .overlay,
    .btn-filter {
        display: none;
    }

    .filter-sheet .sheet {
        position: static;
        max-width: none;
        padding: 18px 16px;
        border-radius: 10px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    }

    .filter-sheet .btn-row {
        flex-direction: column;
        gap: 8px;
    }

    .filter-sheet .btn-row .btn-dark {
        order: -1; /* 「この条件で絞り込む」を上に */
    }

    /* G3-2：左にカレンダー、右にその月の記録 */
    .pc-columns-calendar {
        grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    }

    .calendar-day {
        height: 86px;
    }

    .calendar-link {
        min-height: 86px;
        padding-top: 6px;
        gap: 4px;
    }

    .calendar-link:hover {
        background: #fffbe0;
    }

    .calendar-link.is-static:hover {
        background: none;
    }

    .calendar-team-short {
        display: none;
    }

    .calendar-team-full {
        display: inline;
        font-size: 12px;
    }

    .calendar-score {
        padding: 1px 6px;
        font-size: 12px;
    }

    .calendar-note {
        font-size: 11px;
    }

    /* 月の切り替え：‹ 年月 › をまとめて左に、「今月」は右に */
    .month-nav {
        gap: 12px;
    }

    .month-label {
        flex: none;
        min-width: 140px;
    }

    .month-btn-today {
        margin-left: auto;
    }

    /* G3-6：日付と曜日・時刻、スコアとボタンを横に並べる */
    .game-row {
        gap: 20px;
        padding: 14px 20px;
    }

    .game-date {
        flex-direction: row;
        align-items: baseline;
        gap: 6px;
        width: 150px;
    }

    .game-side {
        flex-direction: row;
        align-items: center;
        gap: 16px;
    }

    .game-side .btn-small,
    .game-side .game-done {
        display: inline-flex;
        justify-content: center;
        min-width: 136px;
    }

    /* G3-4：項目名を左、内容を右に */
    .detail-row {
        flex-direction: row;
        align-items: baseline;
        gap: 16px;
        padding: 12px 0;
    }

    .detail-row dt {
        flex: none;
        width: 120px;
    }

    /* 一覧の行はマウスを乗せたら色を変える */
    .record-row:hover {
        background: #fffbe0;
    }
}
