/**
 * TipPoint Calculator
 * デザイン: 「TOKYO HIGH SCHOOL SCORE」トンマナ準拠
 */

:root {
    --tp-blue-600: #2f6fed;
    --tp-blue-500: #3b82f6;
    --tp-blue-100: #e8f0fe;
    --tp-blue-50:  #f4f8ff;
    --tp-orange-500: #f5941f;
    --tp-orange-100: #fef1e2;
    --tp-green-500: #22a06b;
    --tp-green-100: #e6f7ef;
    --tp-purple-500: #8b6bd8;
    --tp-purple-100: #f1ecfb;
    --tp-teal-500: #14b8a6;
    --tp-teal-100: #e3f8f5;
    --tp-brand-500: #dd5225;
    --tp-ink-900: #1c2530;
    --tp-ink-700: #42505f;
    --tp-ink-500: #7c8a99;
    --tp-ink-300: #b7c1cb;
    --tp-line: #e7ebf0;
    --tp-bg: #f3f5f8;
    --tp-card: #ffffff;
    --tp-radius-lg: 16px;
    --tp-radius-md: 12px;
    --tp-radius-sm: 8px;
}

.tippoint-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 16px 60px;
    font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--tp-ink-900);
    -webkit-font-smoothing: antialiased;
    background: var(--tp-bg);
}

.tippoint-loading {
    text-align: center;
    padding: 60px 0;
    color: var(--tp-ink-500);
}

/* テーマ側の見出し・段落へのデフォルト装飾（枠線・背景など）が漏れて表示されるのを防ぐリセット。
   :where() で括ることで詳細度を上げず、下にある個別クラスのスタイルが必ず優先されるようにしている。
   （以前の class="main" 衝突と同種の対策） */
:where(.tippoint-container) h1,
:where(.tippoint-container) h2,
:where(.tippoint-container) h3,
:where(.tippoint-container) h4,
:where(.tippoint-container) h5,
:where(.tippoint-container) h6,
:where(.tippoint-container) p {
    all: unset;
    display: block;
    box-sizing: border-box;
}

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

.tippoint-form-wrapper {
    display: block;
}

.tippoint-form {
    display: flex;
    flex-direction: column;
}

/* ===== Card ===== */
.tp-card {
    background: var(--tp-card);
    border-radius: var(--tp-radius-lg);
    border: 1px solid var(--tp-line);
    padding: 24px 28px;
    margin-bottom: 20px;
}

.card-title {
    font-size: 19px;
    font-weight: 800;
    color: var(--tp-ink-900);
    margin: 0 0 6px;
}

.card-title-sub {
    font-weight: 600;
    font-size: 13px;
    color: var(--tp-ink-500);
}

/* ===== カードヘッダー：番号バッジ＋区切り線＋タイトル＋任意バッジ ===== */
.tp-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 6px;
}

.tp-card-number {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 800;
}

.tippoint-container .tp-card-number {
    background: #dd5225 !important;
    color: #fff !important;
}

.tp-card-divider {
    flex-shrink: 0;
    width: 1px;
    height: 22px;
    background: var(--tp-line);
}

.tp-card-title-text {
    flex: 1;
    font-size: 19px;
    font-weight: 800;
    color: var(--tp-ink-900);
    margin: 0;
}

.tp-badge-pill {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.tp-badge-pill-blue {
    background: var(--tp-blue-100);
    color: var(--tp-blue-600);
}

.tp-badge-pill-gray {
    background: var(--tp-bg);
    color: var(--tp-ink-500);
}

.tippoint-container .card-sub {
    font-size: 12.5px !important;
    color: var(--tp-ink-900) !important;
    margin: 0 0 18px;
    line-height: 1.6;
}

.tippoint-form-group {
    margin-bottom: 4px;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--tp-ink-900);
    font-size: 13.5px;
}

.tippoint-select-wrap select {
    width: 100%;
    padding: 13px 16px;
    border: none;
    border-radius: var(--tp-radius-sm);
    background: var(--tp-bg);
    font-size: 14px;
    color: var(--tp-ink-900);
    font-family: inherit;
    transition: border-color 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237c8a99' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.tippoint-select-wrap select:focus {
    outline: none;
    border-color: var(--tp-blue-500);
    box-shadow: 0 0 0 3px var(--tp-blue-100);
}

.tippoint-container .form-hint,
.tippoint-container .tp-note {
    display: block;
    margin: 8px 0 0;
    font-size: 11px !important;
    color: var(--tp-ink-900) !important;
    line-height: 1.5;
}

.selected-school-display,
.selected-station-display {
    margin-top: 14px;
    min-height: 0;
}

.tp-badge {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 700;
}

.tp-badge-school {
    background: var(--tp-blue-100);
    color: var(--tp-blue-600);
}

.tp-badge-station {
    background: var(--tp-purple-100);
    color: var(--tp-purple-500);
}

/* ===== 内申点：1〜5ボタン選択（ロジック・UIともに従来通り） ===== */
.tippoint-grade-buttons {
    display: flex;
    gap: 6px;
}

.tippoint-grade-btn {
    flex: 1;
    padding: 9px 0;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-radius-sm);
    background: #fff;
    color: var(--tp-ink-500);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 13px;
    font-family: inherit;
}

.tippoint-grade-btn:hover {
    border-color: var(--tp-blue-500);
    color: var(--tp-blue-600);
}

.tippoint-grade-btn.active {
    background: var(--tp-blue-600);
    color: #fff;
    border-color: var(--tp-blue-600);
}

/* ===== 内申点：主要教科／実技教科を縦に並べる ===== */
.grade-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}

.grade-col-head {
    font-size: 12.5px;
    font-weight: 800;
    padding: 10px 14px;
    border-radius: var(--tp-radius-sm);
    margin-bottom: 16px;
}

.grade-col-head.tp-subj-main {
    background: var(--tp-blue-100);
    color: var(--tp-blue-600);
}

.grade-col-head.tp-subj-skill {
    background: var(--tp-orange-100);
    color: var(--tp-orange-500);
    margin-top: 8px;
}

.subject-row {
    margin-bottom: 18px;
}

.subject-row:last-child {
    margin-bottom: 0;
}

.subject-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.subject-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--tp-ink-900);
}

.subject-name .tp-ic {
    display: flex;
    flex-shrink: 0;
}

.subject-name.tp-accent-blue .tp-ic {
    color: var(--tp-blue-600);
}

.subject-name.tp-accent-orange .tp-ic {
    color: var(--tp-orange-500);
}

.subject-score {
    font-size: 14px;
    font-weight: 800;
    color: var(--tp-ink-900);
    white-space: nowrap;
}

.subject-score span {
    font-size: 11px;
    color: var(--tp-ink-500);
    font-weight: 600;
}

/* 内申点合計（配点ロジックは従来通り：300点満点） */
.grades-summary-bar {
    background: var(--tp-blue-50);
    border-radius: var(--tp-radius-md);
    padding: 16px 20px;
    margin-top: 22px;
}

.grades-summary-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.grades-summary-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--tp-ink-700);
}

.grades-summary-label .q {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--tp-ink-300);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
}

.grades-summary-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--tp-blue-600);
}

.grades-summary-value .tp-max {
    font-size: 13px;
    color: var(--tp-ink-500);
    font-weight: 600;
}

.grades-summary-track {
    height: 8px;
    background: var(--tp-line);
    border-radius: 4px;
    overflow: hidden;
}

.grades-summary-track-fill {
    height: 100%;
    background: var(--tp-blue-600);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* ===== 学力検査／ESAT-J：円形リング ===== */
.score-input-card .card-sub {
    margin-bottom: 6px;
}

.score-input-card .input-with-ring {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
}

.num-input-block {
    flex: 1;
    min-width: 0;
}

.num-input-label {
    font-size: 14px;
    font-weight: 800;
    color: var(--tp-ink-900);
    margin: 0 0 10px;
}

.ring-block {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ring-block .ring-label {
    margin-bottom: 10px;
}

.ring-block.ring-block-reverse .ring-label {
    margin-bottom: 0;
    margin-top: 10px;
}

.ring-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--tp-ink-500);
    white-space: nowrap;
}

.num-input-box {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--tp-card);
    border: 1px solid var(--tp-line);
    border-radius: 10px;
    padding: 14px 18px;
    overflow: hidden;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.num-input-box.is-filled {
    background: var(--tp-blue-100);
    border-color: var(--tp-blue-100);
}

.num-input-box.tp-accent-purple.is-filled {
    background: var(--tp-purple-100);
    border-color: var(--tp-purple-100);
}

.tippoint-container .num-input-box input[type="text"] {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    flex: 1;
    min-width: 0;
    font-size: 16px !important;
    font-weight: 700 !important;
    letter-spacing: normal;
    color: var(--tp-ink-900) !important;
    font-family: inherit !important;
    width: 100%;
    height: auto !important;
    line-height: 1.2 !important;
}

.tippoint-container .num-input-box input[type="text"]:focus {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

.tippoint-container .num-input-box input[type="text"]::placeholder {
    color: var(--tp-ink-300);
    font-weight: 600;
}

.num-input-box .tp-max {
    font-size: 14px;
    color: var(--tp-ink-500);
    font-weight: 600;
    white-space: nowrap;
}

.ring-percent {
    position: relative;
    width: 92px;
    height: 92px;
    flex-shrink: 0;
}

.ring-percent svg {
    position: absolute;
    inset: 0;
}

.ring-percent .ring-value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
}

.ring-percent.tp-accent-blue .ring-value {
    color: var(--tp-blue-600);
}

.ring-percent.tp-accent-purple .ring-value {
    color: var(--tp-purple-500);
}

.ring-percent .ring-progress {
    transition: stroke-dashoffset 0.3s ease;
}

/* ===== 換算後スコア表示ボックス（ラベル＋値） ===== */
.tp-convert-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: var(--tp-blue-50);
    padding: 14px 18px;
    border-radius: var(--tp-radius-md);
    margin-top: 16px;
}

.tippoint-container .tp-convert-label {
    flex: 1;
    margin: 0;
    font-size: 13.5px !important;
    color: var(--tp-ink-900) !important;
    font-weight: 700;
}

.tippoint-container .tp-convert-value {
    margin: 0;
    font-size: 22px !important;
    font-weight: 800;
    color: var(--tp-blue-600) !important;
    white-space: nowrap;
}

/* ===== アイコン付き注記（例：ESAT-J未入力時の注記） ===== */
.tp-icon-note {
    display: flex;
    align-items: center;
    background: var(--tp-bg);
    padding: 14px 18px;
    border-radius: var(--tp-radius-md);
    margin-top: 16px;
}

.tippoint-container .tp-icon-note-text {
    margin: 0;
    font-size: 13px !important;
    color: var(--tp-ink-900) !important;
    font-weight: 700;
}

/* ===== 最寄駅（検索ボックス） ===== */
.tippoint-station-wrapper {
    position: relative;
}

.tp-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--tp-card);
    border: 1px solid var(--tp-line);
    border-radius: 10px;
    padding: 12px 16px;
    position: relative;
}

.tippoint-container .tp-search-box input[type="text"] {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    flex: 1;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--tp-ink-900) !important;
    font-family: inherit !important;
}

.tippoint-container .tp-search-box input[type="text"]:focus {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

.tippoint-container .tp-search-box input[type="text"]::placeholder {
    color: var(--tp-ink-300);
    font-weight: 600;
}

.tp-search-box svg {
    flex-shrink: 0;
    color: var(--tp-ink-300);
}

.tippoint-station-input-container {
    position: relative;
    z-index: 10;
}

.tippoint-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 6px;
    background: var(--tp-card);
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-radius-md);
    max-height: 260px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(28, 37, 48, 0.1);
    display: none;
}

.tippoint-suggestions.active {
    display: block;
}

.tippoint-suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--tp-line);
    transition: background 0.15s ease;
    font-size: 13.5px;
    color: var(--tp-ink-700);
}

.tippoint-suggestion-item:hover {
    background: var(--tp-blue-50);
    color: var(--tp-blue-600);
}

.tippoint-suggestion-item:last-child {
    border-bottom: none;
}

/* ===== CTA Button ===== */
.tippoint-action-buttons {
    margin-top: 4px;
    text-align: center;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 420px;
    background: var(--tp-blue-600);
    color: #fff;
    border: none;
    border-radius: var(--tp-radius-md);
    padding: 16px 24px;
    font-size: 15.5px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    transition: filter 0.15s ease, transform 0.15s ease;
}

.cta-btn:hover:not(:disabled) {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.cta-btn:disabled {
    background: var(--tp-ink-300);
    cursor: not-allowed;
}

/* =====================================================
   結果画面 — 構造は維持、配色・フォントのみ新トンマナに合わせる
   ===================================================== */
.tippoint-results-wrapper {
    padding: 24px 0 60px;
}

.tippoint-results-container {
    background: var(--tp-card);
    border-radius: var(--tp-radius-lg);
    border: 1px solid var(--tp-line);
    padding: 32px 28px;
}

.results-header {
    text-align: center;
    margin-bottom: 32px;
}

.results-divider {
    display: block;
    width: 48px;
    height: 3px;
    border-radius: 2px;
    background: var(--tp-blue-600);
    margin: 0 auto 16px;
}

.results-title {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 800;
    color: var(--tp-ink-900);
}

.results-subtitle {
    margin: 0;
    font-size: 14px;
    color: var(--tp-ink-500);
}

.score-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 32px;
}

.score-card {
    background: var(--tp-bg);
    padding: 18px;
    border-radius: var(--tp-radius-md);
    text-align: center;
    border: 1px solid var(--tp-line);
}

.score-card.score-card-total {
    background: var(--tp-blue-600);
    color: #fff;
    border-color: var(--tp-blue-600);
}

.score-card-label {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--tp-ink-700);
    margin-bottom: 8px;
}

.score-card.score-card-total .score-card-label {
    color: rgba(255, 255, 255, 0.85);
}

.score-card-value {
    font-size: 30px;
    font-weight: 800;
    color: var(--tp-ink-900);
    margin: 0;
}

.score-card.score-card-total .score-card-value {
    color: #fff;
}

.score-card-max {
    font-size: 12.5px;
    color: var(--tp-ink-500);
    margin-top: 4px;
}

.score-card.score-card-total .score-card-max {
    color: rgba(255, 255, 255, 0.75);
}

/* ===== スコアカード下部の進捗バー ===== */
.score-card-track {
    height: 6px;
    background: var(--tp-line);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 12px;
}

.score-card-track-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--tp-blue-500);
    transition: width 0.3s ease;
}

.score-card-teal .score-card-track-fill {
    background: var(--tp-teal-500);
}

.score-card-purple .score-card-track-fill {
    background: var(--tp-purple-500);
}

.score-card-track.score-card-track-white {
    background: rgba(255, 255, 255, 0.3);
}

.score-card-track.score-card-track-white .score-card-track-fill {
    background: #fff;
}

.radar-chart-section {
    margin-bottom: 32px;
    padding: 24px;
    background: var(--tp-bg);
    border-radius: var(--tp-radius-md);
    border: 1px solid var(--tp-line);
}

.radar-title {
    margin: 0 0 18px;
    font-size: 16px;
    font-weight: 800;
    color: var(--tp-ink-900);
    text-align: center;
}

.radar-chart-wrap {
    position: relative;
    width: 100%;
    max-width: 420px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
}

.radar-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ===== 志望校情報（アイコン＋区切り線＋志望校名） ===== */
.school-info-row {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}

.school-info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    border: 1.5px solid var(--tp-blue-100);
    color: var(--tp-blue-600);
}

.school-info-divider {
    flex-shrink: 0;
    width: 1px;
    height: 40px;
    background: var(--tp-line);
}

.school-info-label {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--tp-ink-500);
    margin-bottom: 4px;
}

.school-info-name {
    font-size: 24px;
    font-weight: 800;
    color: var(--tp-ink-900);
}

.school-judgment-section {
    margin-bottom: 32px;
}

.judgment-card {
    background: var(--tp-blue-50);
    padding: 22px 24px;
    border-radius: var(--tp-radius-lg);
    display: flex;
    align-items: center;
    gap: 18px;
}

.judgment-pass {
    background: var(--tp-green-100);
}

.judgment-icon-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--tp-blue-100);
    color: var(--tp-blue-600);
}

.judgment-icon-badge-pass {
    background: var(--tp-green-500);
    color: #fff;
}

.judgment-divider {
    flex-shrink: 0;
    width: 1px;
    height: 48px;
    background: rgba(28, 37, 48, 0.1);
}

.judgment-message {
    flex: 1;
}

.judgment-main {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 800;
    color: var(--tp-ink-900);
}

.judgment-sub {
    margin: 0;
    font-size: 13px;
    color: var(--tp-ink-700);
    line-height: 1.5;
    font-weight: 700;
}

.judgment-estimate-note {
    font-weight: 400 !important;
}

.highlight-blue {
    color: var(--tp-blue-600);
    font-weight: 800;
    font-size: 1.15em;
}

.nearby-jukus-section {
    margin-bottom: 24px;
    padding: 24px;
    background: var(--tp-bg);
    border-radius: var(--tp-radius-md);
    border: 1px solid var(--tp-line);
}

.juku-section-title {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 800;
    color: var(--tp-ink-900);
}

.juku-section-desc {
    margin: 0 0 18px;
    font-size: 12.5px;
    color: var(--tp-ink-500);
}

.jukus-list {
    display: grid;
    gap: 16px;
}

.juku-item {
    background: var(--tp-card);
    border-radius: var(--tp-radius-md);
    border: 1px solid var(--tp-line);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.juku-item:hover {
    box-shadow: 0 8px 20px rgba(28, 37, 48, 0.08);
}

.juku-banner {
    width: calc(100% + 36px);
    margin: 0 -18px 14px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--tp-bg);
}

.juku-banner img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.juku-content {
    padding: 18px;
}

.tippoint-container .juku-name {
    margin: 0 0 8px;
    font-size: 15px !important;
    font-weight: 800;
    color: var(--tp-ink-900) !important;
}

.tippoint-container .juku-distance {
    margin: 6px 0;
    font-size: 13px !important;
    color: var(--tp-blue-600) !important;
    font-weight: 700;
}

.tippoint-container .juku-description {
    margin: 8px 0;
    font-size: 12.5px !important;
    color: var(--tp-ink-700) !important;
    line-height: 1.6;
}

.tippoint-container .juku-phone {
    margin: 6px 0;
    font-size: 12.5px !important;
    color: var(--tp-ink-700) !important;
}

.juku-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

.tp-link-btn {
    padding: 10px 12px;
    text-align: center;
    text-decoration: none;
    border-radius: var(--tp-radius-sm);
    font-size: 12px;
    font-weight: 700;
    transition: filter 0.15s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.tp-link-btn-contact {
    background: var(--tp-blue-600);
    color: #fff;
}

.tp-link-btn-contact:hover {
    filter: brightness(1.08);
}

.tp-link-btn-site {
    background: var(--tp-bg);
    color: var(--tp-ink-700);
    border: 1px solid var(--tp-line);
}

.tp-link-btn-site:hover {
    background: #eceff3;
}

.results-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--tp-line);
}

.tippoint-btn {
    padding: 13px 32px;
    border: none;
    border-radius: var(--tp-radius-md);
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 180px;
    font-family: inherit;
}

.tippoint-btn-reset {
    background: var(--tp-bg);
    color: var(--tp-ink-700);
    border: 1px solid var(--tp-line);
}

.tippoint-btn-reset:hover {
    background: #eceff3;
}

@media (max-width: 640px) {
    .tippoint-container {
        padding: 16px 12px 40px;
    }

    .tp-card {
        padding: 20px 18px;
        margin-bottom: 14px;
    }

    .score-input-card .input-with-ring {
        gap: 12px;
    }

    .ring-percent {
        width: 76px;
        height: 76px;
    }

    .ring-percent svg {
        width: 76px;
        height: 76px;
    }

    .tp-card-header {
        flex-wrap: wrap;
        row-gap: 8px;
    }

    .tp-badge-pill {
        margin-left: 42px;
    }

    .tp-convert-box {
        flex-wrap: wrap;
    }

    .tp-convert-value {
        width: 100%;
        text-align: right;
    }

    .school-info-row {
        gap: 14px;
    }

    .school-info-name {
        font-size: 20px;
    }

    .judgment-card {
        padding: 18px;
        gap: 14px;
    }

    .judgment-icon-badge {
        width: 52px;
        height: 52px;
    }

    .score-cards-container {
        grid-template-columns: 1fr 1fr;
    }

    .juku-buttons {
        grid-template-columns: 1fr;
    }

    .tippoint-btn,
    .cta-btn {
        min-width: auto;
        width: 100%;
    }

    .tippoint-results-container {
        padding: 16px 14px;
    }

    .radar-chart-section {
        padding: 10px;
    }

    .radar-chart-wrap {
        max-width: 100%;
    }

    .pagetop-wrapper {
        right: 12px;
        bottom: 16px;
    }

    .pagetop {
        max-width: 150px;
        font-size: 11px;
        padding: 8px 10px;
    }

    .pagetop-icon {
        width: 64px;
    }
}

/* ===== スクロール追従マスコット ===== */
.pagetop-wrapper {
    position: fixed;
    right: 24px;
    bottom: 28px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    pointer-events: none;
}

.pagetop {
    background: #fff;
    border: 2px solid var(--tp-ink-900);
    border-radius: 16px;
    padding: 10px 14px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--tp-ink-900);
    max-width: 200px;
    text-align: center;
    line-height: 1.5;
    box-shadow: 0 6px 16px rgba(28, 37, 48, 0.14);
}

.pagetop-icon {
    width: 84px;
    height: auto;
    display: block;
}

/* ===== 一番下の問い合わせ導線ブロック ===== */
.tp-inquiry-section {
    background: #fff;
    border-top: 1px solid var(--tp-line);
    padding: 48px 16px;
    margin-top: 8px;
}

.tp-inquiry-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    flex-wrap: wrap;
    gap: 32px 24px;
    text-align: center;
}

.tp-inquiry-text p {
    font-size: 19px !important;
    font-weight: 800;
    color: var(--tp-blue-600) !important;
    line-height: 1.6;
    margin: 0 !important;
}

.tp-interview-button p,
.tp-line-button p {
    font-size: 20px !important;
    font-weight: 800;
    margin: 0 0 12px !important;
}

.tp-interview-button p {
    color: var(--tp-blue-600) !important;
}

.tp-line-button p {
    color: #3cb54a !important;
}

.tp-interview-button a,
.tp-line-button a {
    display: inline-block;
}

.tp-interview-button img,
.tp-line-button img {
    max-width: 220px;
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 640px) {
    .tp-inquiry-container {
        flex-direction: column;
        gap: 20px;
    }

    .tp-interview-button img,
    .tp-line-button img {
        max-width: 180px;
    }
}
