:root {
    /* 2026-09-02: Duolingo の緑をやめ、サイト共通の橙・墨・クリーム紙に（部品の厚みは残す） */
    --td-green: var(--sc-accent-solid);
    --td-green-dark: var(--sc-accent);
    --td-ink: var(--sc-ink);
    --td-muted: var(--sc-ink-soft);
    --td-line: var(--sc-rule);
    --td-surface: var(--sc-surface);
    --td-bg: var(--sc-paper);
    --td-shadow: 0 5px 0 rgba(43, 26, 7, .12);
}

.tduo-page,
.tduo-chat {
    color: var(--td-ink);
    font-family: var(--font-family-round, "Nunito", "M PLUS Rounded 1c", system-ui, sans-serif);
}

.tduo-page {
    min-height: 100vh;
    background: var(--td-bg);
    padding: 42px clamp(18px, 4vw, 56px) 88px;
}

.tduo-page button,
.tduo-page a,
.tduo-chat button,
.tduo-chat a,
.tduo-chat textarea { font: inherit; }

.tduo-hero {
    /* 2026-09-03: 文字と亀が画面幅によって重なっていた（文字650px＋絶対配置の亀）。
       2列のグリッドにして亀を右の列に置く。緑のグラデーションは v3 の1色系統（紙と墨と橙）に揃える */
    position: relative;
    max-width: 1180px;
    min-height: 330px;
    margin: 0 auto 48px;
    padding: clamp(28px, 5vw, 56px) clamp(28px, 5vw, 64px) 0;
    border: 1px solid var(--td-line);
    border-radius: 24px;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(220px, 26vw, 310px);
    column-gap: clamp(24px, 4vw, 48px);
    align-items: end;
    background: var(--sc-surface-tint);
    box-shadow: 0 6px 0 rgba(43, 26, 7, .10);
}

.tduo-hero__copy { position: relative; z-index: 2; max-width: 650px; padding-bottom: clamp(28px, 5vw, 56px); }
.tduo-eyebrow,
.tduo-kicker {
    display: inline-block;
    color: var(--td-green-dark);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .13em;
}
.tduo-eyebrow {
    padding: 8px 13px;
    border: 1px solid #b8e994;
    border-radius: var(--sc-radius);
    background: rgba(255,255,255,.72);
}
.tduo-hero h1 {
    margin: 20px 0 14px;
    color: var(--sc-ink);
    font-size: clamp(2rem, 4.6vw, 3.8rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -.055em;
}
.tduo-hero__copy > p {
    max-width: 590px;
    margin: 0;
    color: var(--sc-ink-soft);
    font-size: clamp(.98rem, 1.8vw, 1.14rem);
    font-weight: 400;
    line-height: 1.8;
}
.tduo-hero__actions { display: flex; align-items: center; gap: 18px; margin-top: 28px; flex-wrap: wrap; }
.tduo-primary {
    min-height: 50px;
    padding: 0 23px;
    border: 0;
    border-radius: 16px;
    color: var(--sc-on-state);
    background: var(--td-green);
    box-shadow: 0 5px 0 var(--td-green-dark);
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}
.tduo-primary:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--td-green-dark); }
.tduo-primary:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--td-green-dark); }
.tduo-login-link { color: var(--td-green-dark); font-weight: 700; text-underline-offset: 4px; }
.tduo-welcome { color: var(--sc-ink-soft); font-weight: 700; }

.tduo-hero__mascot {
    position: relative;
    z-index: 1;
    align-self: end;
    justify-self: end;
    width: 100%;
    margin-bottom: -6px;
}
.tduo-hero__mascot img { display: block; width: 100%; filter: drop-shadow(0 16px 12px rgba(67, 111, 25, .18)); }
.tduo-speech {
    position: absolute;
    right: 60%;
    top: 4%;
    width: 120px;
    padding: 12px 14px;
    border: 2px solid var(--td-line);
    border-radius: 16px 18px 4px 18px;
    background: var(--sc-surface-white);
    color: var(--sc-ink);
    text-align: center;
    font-size: .83rem;
    font-weight: 700;
    line-height: 1.45;
    box-shadow: 0 4px 0 rgba(70,120,30,.1);
}
.tduo-orbit {
    position: absolute;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    color: var(--sc-on-state);
    font-weight: 700;
    box-shadow: 0 5px 0 rgba(0,0,0,.10);
}
.tduo-orbit--one { right: -18px; top: 27%; background: #ce82ff; transform: rotate(9deg); }
.tduo-orbit--two { left: -20px; bottom: 20%; background: #1cb0f6; transform: rotate(-8deg); }

.tduo-layout {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 32px;
    align-items: start;
}
.tduo-section-head { display: flex; justify-content: space-between; gap: 22px; align-items: end; margin-bottom: 22px; }
.tduo-section-head h2,
.mission-card h2,
.how-card h2 { margin: 5px 0 0; color: var(--td-ink); font-size: 1.5rem; font-weight: 700; letter-spacing: -.025em; }
.tduo-section-head p { margin: 0 0 2px; color: var(--td-muted); font-size: .85rem; font-weight: 700; }

.tduo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.tutor-card {
    position: relative;
    min-height: 230px;
    padding: 20px;
    border: 2px solid color-mix(in srgb, var(--tutor), white 55%);
    border-bottom-width: 6px;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    gap: 14px;
    color: var(--td-ink);
    text-align: left;
    background: linear-gradient(145deg, var(--tutor-soft), var(--sc-surface-white) 72%);
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.tutor-card:hover,
.tutor-card:focus-visible { transform: translateY(-4px); border-color: var(--tutor); box-shadow: 0 10px 22px rgba(35, 55, 70, .10); outline: none; }
.tutor-card:active { transform: translateY(1px); }
.tutor-card__status {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 5px 10px;
    border-radius: var(--sc-radius);
    color: color-mix(in srgb, var(--tutor), black 25%);
    background: rgba(255,255,255,.78);
    font-size: .69rem;
    font-weight: 700;
}
.tutor-card.has-history .tutor-card__status { color: var(--sc-on-state); background: var(--tutor); }
.tutor-card__portrait { position: relative; flex: 0 0 128px; height: 148px; display: flex; align-items: flex-end; justify-content: center; }
.tutor-card__portrait::before {
    content: "";
    position: absolute;
    left: 2px;
    right: 2px;
    bottom: 0;
    height: 112px;
    border-radius: 50% 50% 22px 22px;
    background: color-mix(in srgb, var(--tutor), white 75%);
}
.tutor-card__portrait img { position: relative; z-index: 1; width: 124px; height: 124px; object-fit: contain; filter: drop-shadow(0 8px 5px rgba(37,52,66,.14)); }
.tutor-card__subject-icon {
    position: absolute;
    z-index: 2;
    top: 2px;
    left: 0;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    color: var(--sc-on-state);
    background: var(--tutor);
    box-shadow: 0 4px 0 color-mix(in srgb, var(--tutor), black 18%);
    font-weight: 700;
    font-size: .9rem;
}
.tutor-card__body { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; padding-bottom: 5px; }
.tutor-card__subject { margin-bottom: 5px; color: color-mix(in srgb, var(--tutor), black 24%); font-size: .7rem; font-weight: 700; letter-spacing: .05em; }
.tutor-card__body strong { font-size: 1.35rem; font-weight: 700; }
.tutor-card__tagline { min-height: 42px; margin-top: 6px; color: var(--td-muted); font-size: .82rem; font-weight: 700; line-height: 1.5; }
.tutor-card__cta { margin-top: 13px; color: color-mix(in srgb, var(--tutor), black 18%); font-size: .79rem; font-weight: 700; }

.tduo-side { position: sticky; top: 92px; display: grid; gap: 18px; }
.mission-card,
.how-card { border: 2px solid var(--td-line); border-bottom-width: 5px; border-radius: 24px; background: var(--td-surface); padding: 22px; }
.mission-card__top { display: flex; justify-content: space-between; gap: 16px; }
.mission-card__badge { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 16px; background: #fff1d2; font-size: 1.45rem; }
.mission-card > p { margin: 13px 0 15px; color: var(--td-muted); font-size: .87rem; font-weight: 700; }
.mission-progress { display: flex; align-items: center; gap: 12px; }
.mission-progress__bar { height: 14px; flex: 1; overflow: hidden; border-radius: var(--sc-radius); background: var(--sc-chat-rule-pale); }
.mission-progress__bar span { display: block; height: 100%; width: 0%; border-radius: inherit; background: linear-gradient(90deg, #58cc02, #8ee000); transition: width .45s ease; }
.mission-progress strong { color: #58a819; font-size: .83rem; }
.mission-card__reward { display: flex; gap: 11px; margin-top: 20px; padding: 14px; border-radius: 16px; background: var(--sc-chat-ok-surface); color: var(--td-muted); font-size: .76rem; line-height: 1.45; }
.mission-card__reward > span:first-child { font-size: 1.45rem; }
.mission-card__reward strong { color: var(--td-ink); font-size: .83rem; }
.how-card ol { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 17px; }
.how-card li { display: flex; gap: 12px; align-items: center; }
.how-card li > span { display: grid; place-items: center; flex: 0 0 31px; height: 31px; border: 2px solid var(--sc-chat-ok-border); border-radius: 8px; color: var(--sc-chat-ok-text); background: var(--sc-chat-ok-surface-bright); font-size: .76rem; font-weight: 700; }
.how-card li div { display: flex; flex-direction: column; line-height: 1.3; }
.how-card li strong { font-size: .82rem; }
.how-card li small { margin-top: 3px; color: var(--td-muted); font-size: .7rem; }

.tduo-chat[hidden] { display: none; }
.tduo-chat { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 18px; }
.tduo-chat__backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(16, 28, 35, .58); backdrop-filter: blur(5px); cursor: default; }
.tduo-chat__panel {
    --chat-tutor: var(--td-green);
    --chat-soft: var(--sc-chat-ok-soft);
    position: relative;
    width: min(720px, 100%);
    height: min(820px, calc(100vh - 36px));
    border: 0;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--sc-surface-white);
    box-shadow: 0 30px 80px rgba(0,0,0,.30);
    animation: tduo-pop .2s ease-out;
}
@keyframes tduo-pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.tduo-chat__header { min-height: 78px; padding: 12px 18px; border-bottom: 2px solid var(--sc-chat-rule-header); display: flex; align-items: center; gap: 12px; background: linear-gradient(90deg, var(--chat-soft), var(--sc-surface-white) 65%); }
.tduo-chat__close { width: 38px; height: 38px; border: 0; border-radius: 8px; color: var(--sc-chat-ink-control); background: rgba(255,255,255,.75); font-size: 1.65rem; line-height: 1; cursor: pointer; }
.tduo-chat__avatar { width: 52px; height: 52px; border: 2px solid color-mix(in srgb, var(--chat-tutor), white 40%); border-radius: 16px; overflow: hidden; display: grid; place-items: center; background: var(--chat-soft); }
.tduo-chat__avatar img { width: 54px; height: 54px; object-fit: contain; }
.tduo-chat__identity { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.tduo-chat__identity strong { font-size: 1.02rem; font-weight: 700; }
.tduo-chat__identity small { display: flex; align-items: center; gap: 6px; margin-top: 3px; color: var(--td-muted); font-weight: 700; }
.tduo-online { width: 8px; height: 8px; border-radius: 50%; background: #58cc02; box-shadow: 0 0 0 3px rgba(88,204,2,.15); }
.tduo-chat__reset { padding: 8px 11px; border: 1px solid var(--sc-chat-rule-control); border-radius: 8px; color: var(--sc-chat-ink-control-soft); background: rgba(255,255,255,.75); font-size: .72rem; font-weight: 700; cursor: pointer; }

.tduo-chat__messages { flex: 1; min-height: 0; overflow-y: auto; padding: 26px clamp(16px, 4vw, 34px); display: flex; flex-direction: column; gap: 16px; background: linear-gradient(var(--sc-chat-surface-messages), var(--sc-surface-white)); scroll-behavior: smooth; }
.chat-message { display: flex; gap: 10px; max-width: 88%; align-items: flex-end; }
.chat-message--user { margin-left: auto; flex-direction: row-reverse; }
.chat-message__avatar { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 8px; overflow: hidden; background: var(--chat-soft); }
.chat-message__avatar img { width: 100%; height: 100%; object-fit: contain; }
.chat-message__bubble { padding: 12px 15px; border: 2px solid var(--sc-chat-rule-bubble); border-radius: 16px 18px 18px 5px; color: var(--sc-chat-ink-bubble); background: var(--sc-surface-white); font-size: calc(.91rem - 1px); font-weight: 400; line-height: 1.65; box-shadow: 0 2px 0 rgba(35,52,66,.06); overflow-wrap: anywhere; }
.chat-message--user .chat-message__bubble { border-color: color-mix(in srgb, var(--chat-tutor), white 50%); border-radius: 16px 18px 5px 18px; color: var(--sc-on-state); background: var(--chat-tutor); box-shadow: 0 3px 0 color-mix(in srgb, var(--chat-tutor), black 16%); }
.chat-message__bubble p { margin: 0 0 .65em; }
.chat-message__bubble p:last-child { margin-bottom: 0; }
.chat-message__bubble ul,
.chat-message__bubble ol { margin: .4em 0; padding-left: 1.3em; }
.chat-message__bubble code { padding: 2px 5px; border-radius: 8px; background: rgba(24,40,55,.08); font-size: .86em; }
.chat-message__bubble pre { max-width: 100%; overflow-x: auto; padding: 12px; border-radius: 8px; color: #e7edf0; background: #21313e; }
.chat-message__bubble pre code { padding: 0; color: inherit; background: transparent; }
.chat-loading { display: inline-flex; gap: 5px; padding: 14px 17px; border: 2px solid var(--sc-chat-rule-bubble); border-radius: 16px 18px 18px 5px; background: var(--sc-surface-white); }
.chat-loading i { width: 7px; height: 7px; border-radius: 50%; background: var(--chat-tutor); animation: tduo-dot 1s infinite ease-in-out; }
.chat-loading i:nth-child(2) { animation-delay: .15s; }
.chat-loading i:nth-child(3) { animation-delay: .3s; }
@keyframes tduo-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-5px); opacity: 1; } }
.chat-empty { margin: auto; color: var(--td-muted); text-align: center; font-size: .85rem; font-weight: 700; }

.tduo-chat__starters { padding: 10px 18px; border-top: 1px solid var(--sc-chat-rule-starters); display: flex; gap: 8px; overflow-x: auto; background: var(--sc-surface-white); }
.tduo-chat__starters:empty { display: none; }
.tduo-chat__starters button { flex: 0 0 auto; max-width: 245px; padding: 8px 12px; border: 1px solid color-mix(in srgb, var(--chat-tutor), white 52%); border-radius: var(--sc-radius); color: color-mix(in srgb, var(--chat-tutor), black 22%); background: var(--chat-soft); font-size: .73rem; font-weight: 700; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tduo-composer { position: relative; padding: 13px 18px 30px; border-top: 1px solid var(--sc-chat-rule-composer); display: flex; gap: 10px; align-items: flex-end; background: var(--sc-surface-white); }
.tduo-composer textarea { flex: 1; min-height: 46px; max-height: 130px; padding: 12px 14px; border: 2px solid var(--sc-chat-rule-input); border-radius: 16px; resize: none; color: var(--td-ink); background: var(--sc-chat-surface-input); font-size: .9rem; line-height: 1.45; outline: none; }
.tduo-composer textarea:focus { border-color: var(--chat-tutor); background: var(--sc-surface-white); }
.tduo-composer > button { flex: 0 0 48px; width: 48px; height: 48px; border: 0; border-radius: 16px; color: var(--sc-on-state); background: var(--chat-tutor); box-shadow: 0 4px 0 color-mix(in srgb, var(--chat-tutor), black 18%); font-size: 1.1rem; cursor: pointer; }
.tduo-composer > button:disabled { opacity: .45; cursor: wait; }
.tduo-composer small { position: absolute; left: 20px; bottom: 8px; color: var(--sc-chat-ink-note); font-size: .62rem; }
.tduo-login-wall { padding: 16px 20px; border-top: 2px solid var(--sc-chat-rule-login); display: flex; gap: 14px; justify-content: space-between; align-items: center; background: var(--sc-surface-white); }
.tduo-login-wall div { display: flex; flex-direction: column; }
.tduo-login-wall strong { font-size: .87rem; }
.tduo-login-wall span { margin-top: 3px; color: var(--td-muted); font-size: .7rem; }
.tduo-login-wall a { flex: 0 0 auto; padding: 11px 15px; border-radius: 8px; color: var(--sc-on-state); background: var(--chat-tutor); box-shadow: 0 4px 0 color-mix(in srgb, var(--chat-tutor), black 18%); text-decoration: none; font-size: .77rem; font-weight: 700; }
.tduo-toast { position: fixed; z-index: 11000; left: 50%; bottom: 28px; transform: translate(-50%, 16px); max-width: min(90vw, 470px); padding: 11px 18px; border-radius: 8px; color: var(--sc-on-state); background: #243442; box-shadow: 0 10px 30px rgba(0,0,0,.22); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; font-size: .82rem; font-weight: 700; }
.tduo-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
body.tduo-modal-open { overflow: hidden; }

[data-theme="dark"] .tduo-page {
    --td-ink: var(--sc-chat-dark-ink);
    --td-muted: var(--sc-chat-dark-ink-soft);
    --td-line: var(--sc-chat-dark-rule);
    --td-surface: var(--sc-chat-dark-surface);
    --td-bg: var(--sc-chat-dark-paper);
    background: radial-gradient(circle at 8% 12%, rgba(88,204,2,.08), transparent 25rem), var(--sc-chat-dark-paper);
}
[data-theme="dark"] .tduo-hero { border-color: var(--sc-rule-strong); background: var(--sc-chat-dark-surface-tint); box-shadow: none; }
[data-theme="dark"] .tduo-hero h1 { color: var(--sc-dark-ink-standard); }
[data-theme="dark"] .tduo-hero__copy > p,
[data-theme="dark"] .tduo-welcome { color: var(--sc-chat-dark-welcome); }
[data-theme="dark"] .tduo-eyebrow { color: var(--sc-chat-dark-ok); border-color: var(--sc-chat-dark-ok-border); background: rgba(12,25,16,.6); }
[data-theme="dark"] .tutor-card { color: var(--td-ink); background: linear-gradient(145deg, color-mix(in srgb, var(--tutor), var(--sc-chat-dark-surface) 82%), var(--sc-chat-dark-surface) 72%); border-color: color-mix(in srgb, var(--tutor), var(--sc-chat-dark-surface) 50%); }
[data-theme="dark"] .tutor-card__portrait::before { background: color-mix(in srgb, var(--tutor), var(--sc-chat-dark-surface) 72%); }
[data-theme="dark"] .tutor-card__status { background: rgba(17,30,36,.78); }
[data-theme="dark"] .mission-card__reward { background: var(--sc-chat-dark-ok-surface); }
[data-theme="dark"] .mission-progress__bar { background: var(--sc-chat-dark-progress); }
[data-theme="dark"] .how-card li > span { background: var(--sc-chat-dark-step-surface); border-color: var(--sc-chat-dark-step-border); }
[data-theme="dark"] .tduo-chat__panel,
[data-theme="dark"] .tduo-chat__header,
[data-theme="dark"] .tduo-chat__starters,
[data-theme="dark"] .tduo-composer,
[data-theme="dark"] .tduo-login-wall { background: var(--sc-chat-dark-surface); color: var(--sc-chat-dark-ink); }
[data-theme="dark"] .tduo-chat__messages { background: linear-gradient(var(--sc-chat-dark-messages-a), var(--sc-chat-dark-messages-b)); }
[data-theme="dark"] .chat-message__bubble { color: var(--sc-chat-dark-bubble-ink); border-color: var(--sc-chat-dark-bubble-rule); background: var(--sc-chat-dark-bubble-surface); }
[data-theme="dark"] .tduo-composer textarea { color: var(--sc-chat-dark-ink); border-color: var(--sc-chat-dark-input-rule); background: var(--sc-chat-dark-messages-a); }

@media (max-width: 980px) {
    .tduo-layout { grid-template-columns: 1fr; }
    .tduo-side { position: static; grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 720px) {
    .tduo-page { padding: 22px 14px 66px; }
    .tduo-hero { display: block; min-height: 430px; padding: 28px 24px 210px; border-radius: 24px; }
    .tduo-hero__copy { max-width: none; padding-bottom: 0; }
    .tduo-hero__mascot { position: absolute; bottom: -6px; margin-bottom: 0; }
    .tduo-hero h1 { font-size: clamp(2rem, 10vw, 3rem); }
    .tduo-hero__mascot { width: 220px; min-width: 0; right: 22px; }
    .tduo-speech { right: 68%; top: 9%; width: 112px; padding: 10px; }
    .tduo-grid { grid-template-columns: 1fr; }
    .tutor-card { min-height: 194px; }
    .tutor-card__portrait { flex-basis: 116px; height: 134px; }
    .tutor-card__portrait img { width: 112px; height: 112px; }
    .tduo-side { grid-template-columns: 1fr; }
    .tduo-section-head { align-items: start; }
    .tduo-section-head p { display: none; }
    .tduo-chat { padding: 0; place-items: stretch; }
    .tduo-chat__panel { width: 100%; height: 100dvh; max-height: none; border-radius: 0; }
    .tduo-chat__header { padding-top: max(12px, env(safe-area-inset-top)); }
    .tduo-composer { padding-bottom: max(30px, calc(env(safe-area-inset-bottom) + 22px)); }
}

@media (max-width: 430px) {
    .tduo-hero__actions { align-items: stretch; flex-direction: column; }
    .tduo-primary { width: 100%; }
    .tduo-login-link,
    .tduo-welcome { text-align: center; }
    .tutor-card { padding: 16px; gap: 10px; }
    .tutor-card__portrait { flex-basis: 102px; }
    .tutor-card__body strong { font-size: 1.2rem; }
    .tduo-login-wall { align-items: stretch; flex-direction: column; }
    .tduo-login-wall a { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    .tduo-page *, .tduo-chat * { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


.tduo-eyebrow,
.tduo-kicker { display: none; }

.tduo-hero h1 { margin-top: 0; }
.tduo-section-head h2,
.mission-card h2,
.how-card h2 { margin-top: 0; }

.tduo-hero::before,
.tduo-hero::after,
.tduo-orbit { display: none; }

.tduo-hero h1 { font-weight: 800; letter-spacing: -.03em; }

.tduo-hero__copy > p { font-weight: 400; }

@media (max-width: 720px) {
    .tduo-page { padding: 20px 18px 66px; }

    .tduo-hero { min-height: 0; padding: 26px 22px 178px; }

    .tduo-hero h1 { font-size: clamp(1.55rem, 7.2vw, 2.2rem); line-height: 1.28; }
    .tduo-hero__copy > p { font-size: .92rem; line-height: 1.75; }

    .tduo-primary { min-height: 46px; }
}

@media (max-width: 430px) {
    .tduo-hero { padding: 22px 18px 168px; }
    .tduo-hero h1 { font-size: clamp(1.45rem, 6.8vw, 1.9rem); }
    .tduo-hero__mascot { width: 196px; right: 14px; }
    .tduo-speech { width: 100px; font-size: .78rem; }
}

.chat-message__bubble .frac {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    vertical-align: middle;
    margin: 0 .2em;
    font-size: .82em;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}
.chat-message__bubble .frac-n,
.chat-message__bubble .frac-d {
    padding: 0 .22em;
    text-align: center;
}
.chat-message__bubble .frac-d {
    border-top: 1px solid currentColor;
}


.tduo-chat__gear {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--td-line);
    border-radius: var(--sc-radius);
    color: var(--td-ink);
    background: #fff;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}
.tduo-chat__gear svg { width: 20px; height: 20px; }
.tduo-chat__gear:hover { background: var(--td-bg); }
.tduo-chat__gear:active { transform: scale(.94); }
.tduo-chat__gear:focus-visible { outline: 2px solid var(--td-green); outline-offset: 2px; }

.tduo-sheet {
    position: fixed;
    inset: 0;
    z-index: 10500;
    display: grid;
    place-items: center;
    padding: 20px;
}
.tduo-sheet[hidden] { display: none; }
.tduo-sheet__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    background: rgba(18, 32, 24, .42);
    cursor: pointer;
}
.tduo-sheet__panel {
    position: relative;
    width: min(560px, 100%);
    max-height: min(86vh, 720px);
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(20, 40, 28, .28);
    overflow: hidden;
}
.tduo-sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--td-line);
}
.tduo-sheet__head h2 { margin: 0; font-size: 1.15rem; font-weight: 700; color: var(--td-ink); }
.tduo-sheet__close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: var(--sc-radius);
    color: var(--td-muted);
    background: transparent;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}
.tduo-sheet__close:hover { background: var(--td-bg); }
.tduo-sheet__body { padding: 18px 20px 24px; overflow-y: auto; }

.tduo-field { margin-bottom: 26px; }
.tduo-field:last-child { margin-bottom: 0; }
.tduo-field h3 { margin: 0 0 6px; font-size: .95rem; font-weight: 700; color: var(--td-ink); }
.tduo-field__lead { margin: 0 0 14px; color: var(--td-muted); font-size: .87rem; line-height: 1.75; }
.tduo-field__note { margin: 10px 0 0; color: var(--td-muted); font-size: .8rem; line-height: 1.7; }

.tduo-levels { display: flex; flex-direction: column; gap: 8px; }
.tduo-level {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--td-line);
    border-radius: 8px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.tduo-level:hover { border-color: #bfe39a; }
.tduo-level.is-on { border-color: var(--td-green); background: #f4fded; }
.tduo-level:focus-visible { outline: 2px solid var(--td-green); outline-offset: 2px; }
.tduo-level__num {
    flex: 0 0 28px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: var(--sc-radius);
    color: var(--td-muted);
    background: var(--td-bg);
    font-weight: 700;
    font-size: .88rem;
}
.tduo-level.is-on .tduo-level__num { color: #fff; background: var(--td-green); }
.tduo-level__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tduo-level__text strong { font-size: .92rem; font-weight: 700; color: var(--td-ink); }
.tduo-level__text small { font-size: .8rem; line-height: 1.6; color: var(--td-muted); }

.tduo-danger {
    width: 100%;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid #f0c2c2;
    border-radius: 8px;
    color: #c0392b;
    background: #fff8f8;
    font-weight: 700;
    font-size: .88rem;
    cursor: pointer;
}
.tduo-danger:hover { background: #fdeeee; }

.tduo-links { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 7px; }
.tduo-links a { color: #438d11; font-size: .88rem; text-underline-offset: 3px; }

.tduo-intro-scale { margin: 0 0 16px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.tduo-intro-scale li {
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--td-ink);
    font-size: .88rem;
}
.tduo-intro-scale span {
    flex: 0 0 26px;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: var(--sc-radius);
    color: #fff;
    background: var(--td-green);
    font-weight: 700;
    font-size: .82rem;
}
.tduo-check { display: flex; align-items: center; gap: 9px; margin: 18px 0 16px; color: var(--td-muted); font-size: .86rem; cursor: pointer; }
.tduo-check input { width: 17px; height: 17px; accent-color: var(--td-green); }
.tduo-intro-ok { width: 100%; }

@media (max-width: 560px) {
    .tduo-sheet { padding: 0; place-items: end stretch; }
    .tduo-sheet__panel { width: 100%; max-height: 92vh; border-radius: 16px 16px 0 0; }
    .tduo-sheet__body { padding-bottom: max(24px, calc(env(safe-area-inset-bottom) + 18px)); }
}
/* 2026-09 academic learning surface: keep tutor choice, remove gamified chrome. */
.tduo-page {
    font-family: var(--font-family, "Noto Sans JP", system-ui, sans-serif);
}
.tduo-hero {
    border-radius: var(--sc-radius, 8px);
    background: var(--td-surface);
    box-shadow: none;
}
.tduo-hero h1 { letter-spacing: -.025em; }
.tduo-primary {
    border: 1px solid var(--td-green-dark);
    border-radius: var(--sc-radius, 8px);
    color: var(--sc-accent-ink);
    box-shadow: none;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.tduo-primary:hover,
.tduo-primary:active {
    transform: none;
    box-shadow: none;
}
.tduo-speech {
    border-width: 1px;
    border-radius: var(--sc-radius, 8px);
    box-shadow: none;
}
.tduo-hero__mascot img { filter: none; }
.tduo-grid {
    gap: 0 24px;
    border-top: 1px solid var(--td-line);
}
.tutor-card {
    min-height: 164px;
    padding: 18px 0;
    border: 0;
    border-bottom: 1px solid var(--td-line);
    border-radius: 0;
    display: flex;
    align-items: center;
    background: transparent;
    box-shadow: none;
    transition: background-color .15s ease, border-color .15s ease;
}
.tutor-card:hover,
.tutor-card:focus-visible {
    transform: none;
    border-color: var(--td-line);
    background: transparent;
    box-shadow: none;
    outline: none;
}
/* 2026-10-09 マウスを重ねても色を付けない（CEO）。キーボードで選んだときだけ枠を出す */
.tutor-card:focus-visible {
    outline: 2px solid var(--td-green);
    outline-offset: -2px;
}
.tutor-card:active { transform: none; }
.tutor-card__status {
    position: static;
    order: 3;
    margin-left: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: var(--td-muted);
    background: transparent;
    white-space: nowrap;
}
.tutor-card__portrait {
    order: 1;
    flex: 0 0 86px;
    width: 86px;
    height: 90px;
}
.tutor-card__portrait::before { display: none; }
.tutor-card__portrait img {
    width: 84px;
    height: 84px;
    filter: none;
}
.tutor-card__subject-icon {
    width: 28px;
    height: 28px;
    border: 1px solid var(--tutor);
    border-radius: var(--sc-radius, 8px);
    color: color-mix(in srgb, var(--tutor), black 28%);
    background: var(--td-surface);
    box-shadow: none;
    font-size: .76rem;
}
.tutor-card__body {
    order: 2;
    padding-bottom: 0;
}
.tutor-card__subject { color: var(--td-muted); }
.tutor-card__body strong { font-size: 1.15rem; }
.tutor-card__tagline {
    min-height: 0;
    margin-top: 4px;
    font-weight: 400;
}
.tutor-card__cta {
    margin-top: 8px;
    color: var(--td-green-dark);
    text-decoration: underline;
    text-underline-offset: 4px;
}
.mission-card,
.how-card {
    border: 1px solid var(--td-line);
    border-bottom-width: 1px;
    border-radius: 8px;
    box-shadow: none;
}
.mission-card__badge { display: none; }
.mission-card__reward {
    margin-top: 20px;
    padding: 14px 0 0;
    border-top: 1px solid var(--td-line);
    border-radius: 0;
    background: transparent;
}
.mission-card__reward > span:first-child { font-size: inherit; }
.mission-progress__bar {
    border-radius: var(--sc-radius, 8px);
    background: var(--td-line);
}
.mission-progress__bar span { background: var(--td-green); }
.how-card li > span {
    border: 1px solid var(--td-line);
    border-radius: var(--sc-radius, 8px);
    color: var(--td-ink);
    background: transparent;
}
[data-theme="dark"] .tduo-page { background: var(--td-bg); }
[data-theme="dark"] .tduo-hero { background: var(--td-surface); box-shadow: none; }
[data-theme="dark"] .tutor-card { background: transparent; border-color: var(--td-line); }
[data-theme="dark"] .tutor-card:hover,
[data-theme="dark"] .tutor-card:focus-visible { background: transparent; }
[data-theme="dark"] .tutor-card__subject-icon { color: var(--td-ink); background: var(--td-surface); }
@media (max-width: 720px) {
    .tduo-hero { border-radius: var(--sc-radius, 8px); }
    .tduo-grid { gap: 0; }
    .tutor-card { min-height: 134px; padding: 16px 0; }
    .tutor-card__portrait { flex-basis: 78px; width: 78px; height: 82px; }
    .tutor-card__portrait img { width: 76px; height: 76px; }
}

/* 2026-09 academic chat surface: keep conversation first. */
.tduo-chat__panel {
    border: 1px solid var(--td-line);
    border-radius: 8px;
    box-shadow: none;
}
.tduo-chat__backdrop { backdrop-filter: none; }
.tduo-chat__header {
    border-bottom: 1px solid var(--td-line);
    background: var(--td-surface);
}
.tduo-chat__close,
.tduo-chat__avatar {
    border: 1px solid var(--td-line);
    border-radius: var(--sc-radius, 8px);
    background: var(--td-surface);
}
.tduo-chat__messages { background: var(--td-surface); }
.chat-message__bubble {
    border: 1px solid var(--sc-chat-rule-bubble);
    border-radius: var(--sc-radius, 8px);
    box-shadow: none;
    background: var(--td-surface);
}
.chat-message--user .chat-message__bubble {
    border-color: var(--chat-tutor);
    border-radius: var(--sc-radius, 8px);
    color: var(--td-ink);
    background: var(--sc-surface-tint);
    box-shadow: none;
}
.chat-loading { border: 1px solid var(--sc-chat-rule-bubble); border-radius: var(--sc-radius, 8px); }
.tduo-chat__starters,
.tduo-composer,
.tduo-login-wall {
    border-color: var(--td-line);
    background: var(--td-surface);
}
.tduo-chat__starters button {
    border: 1px solid var(--td-line);
    border-radius: var(--sc-radius, 8px);
    color: var(--td-ink);
    background: transparent;
}
.tduo-composer textarea {
    border: 1px solid var(--td-line);
    border-radius: var(--sc-radius, 8px);
    background: transparent;
}
.tduo-composer > button,
.tduo-login-wall a {
    border: 1px solid var(--chat-tutor);
    border-radius: var(--sc-radius, 8px);
    color: var(--sc-accent-ink);
    box-shadow: none;
}
[data-theme="dark"] .chat-message__bubble {
    border-color: var(--sc-chat-dark-bubble-rule);
    color: var(--sc-chat-dark-bubble-ink);
    background: var(--sc-chat-dark-bubble-surface);
}
[data-theme="dark"] .chat-message--user .chat-message__bubble {
    border-color: var(--chat-tutor);
    color: var(--td-ink);
    background: var(--sc-chat-dark-surface-tint);
}
[data-theme="dark"] .tduo-chat__messages { background: var(--td-surface); }
@media (max-width: 720px) { .tduo-chat__panel { border-radius: 0; } }

/* 画像を付けるボタンと、送る前のプレビュー（2026-09-25） */
.tduo-composer > button.tduo-attach { flex: 0 0 44px; width: 44px; height: 48px; color: var(--td-ink); background: transparent; border: 1px solid var(--td-line); box-shadow: none; display: inline-flex; align-items: center; justify-content: center; }
.tduo-composer > button.tduo-attach[aria-pressed="true"] { border-color: var(--chat-tutor); color: var(--chat-tutor); }
.tduo-attach-preview { display: flex; align-items: center; gap: 12px; padding: 10px 18px 0; background: var(--td-surface); }
.tduo-attach-preview[hidden] { display: none; }
.tduo-attach-preview img { width: 64px; height: 64px; object-fit: cover; border: 1px solid var(--td-line); border-radius: var(--sc-radius, 8px); }
.tduo-attach-preview button { min-height: 36px; padding: 6px 12px; border: 1px solid var(--td-line); border-radius: var(--sc-radius, 8px); background: transparent; color: var(--td-ink); font: inherit; font-size: .8rem; cursor: pointer; }

/* 2026-09-29 吹き出し：スマホで「ログインして会話を保存」に重なる・「やってみよ／う！」で折れる・ダークで白地に薄い字（CEOのスクショ） */
.tduo-speech { width: auto; white-space: nowrap; }
[data-theme="dark"] .tduo-speech { background: var(--sc-chat-dark-surface); color: var(--sc-dark-ink-standard); border-color: var(--sc-rule-strong); box-shadow: none; }
@media (max-width: 720px) { .tduo-speech { top: 30%; right: 88%; } } /* 2026-10-01 パーツ点検「uiが壊れてる」＝吹き出しが亀の顔にかぶっていた */
