/* 学習の書斎。教材本文・直角マップの形状は既存のまま、外枠と道しるべを整える。 */
:root { --paper: #f6f5ef; --ink: #243934; --muted: #64746b; --line: #dbe1d8; --accent: #286653; --accent-dark: #194b3e; --gold: #94713b; --shadow: 0 8px 24px #24393408; }
.sharoshi-app [hidden] { display: none !important; }
.sharoshi-app { --journey-topbar-height: 56px; }
.sharoshi-app :is(button, a, input, select, textarea, summary):focus-visible { outline: 3px solid #ad8142; outline-offset: 3px; }
.sharoshi-app button:disabled { cursor: default; }
.sharoshi-app .sidenav { background: #ecefe7; border-right-color: #d5ddd0; }
.sharoshi-app .sidenav-brand { padding: 22px 16px 17px; }
.sharoshi-app .sidenav-brand img { width: 28px; height: 28px; }
.sharoshi-app .sidenav-brand span { color: #2f5143; font-size: 15px; }
.sharoshi-app .sidenav-viewer { color: #596b61; padding-left: 16px; font-size: 10px; }
.sharoshi-app .sidenav-list { padding-top: 18px; }
.sharoshi-app .sidenav-item { min-height: 49px; gap: 14px; padding-left: 21px; color: #54685c; }
.sharoshi-app .sidenav-item i { display: grid; place-items: center; }
.sharoshi-app .sidenav-item.is-active { color: #194b3e; background: #fafaf6; box-shadow: inset 3px 0 #94713b; }
.sharoshi-app .sidenav-item:hover { background: #fff9; }
.sharoshi-app .topbar { background: #fafbf8; min-height: 56px; box-sizing: border-box; }
.sharoshi-app .topbar-title { font-size: 16px; }
.sharoshi-app .topbar-streak { background: #eef3e9; border-color: #d5dfcd; color: #426044; font-size: 11px; }
.sharoshi-app .topbar-streak.is-pending { color: #526554; background: #eef3e9; }
.sharoshi-app .topbar-btn { border-radius: 4px; }
.record-save-notice { display: flex; align-items: center; gap: 12px; padding: 12px 20px; background: #fff2dc; border-bottom: 1px solid #d4ad73; color: #674817; font-size: 12px; }
.record-save-notice button { margin-left: auto; border: 1px solid #d4ad73; background: transparent; color: inherit; min-width: 36px; min-height: 36px; }
.sharoshi-app #openGenerator { display: none; } /* 登録は辞典の検索欄・関連語から行える */
.sharoshi-app .home-wrap { max-width: 1180px; padding: 28px clamp(16px, 3.4vw, 44px) 50px; gap: 22px; }
.sharoshi-app .plan-hero { background: radial-gradient(ellipse at 14% 100%, #476251, #233e34 66%, #1c322b); border: 1px solid #567363; border-radius: 8px; box-shadow: 0 12px 26px #253c3015; padding-top: 12px; }
.sharoshi-app .plan-hero-chara { height: clamp(200px, 21vw, 248px); animation: none; filter: drop-shadow(0 10px 18px #0004); }
.sharoshi-app .plan-hero-glow { background: radial-gradient(closest-side, #e4c88c3d, transparent); }
.sharoshi-app .plan-hero-bubble { background: #faf9f0; color: #293e35; padding: 16px 20px; border-radius: 3px; }
.sharoshi-app .plan-hero-bubble::before { border-right-color: #faf9f0; }
.sharoshi-app .plan-hero-line { font-size: 15px; line-height: 1.9; }
.sharoshi-app .plan-hero-sub { color: #526859; font-size: 12px; line-height: 1.8; }
.sharoshi-app .plan-hero-name { color: #e0e8d8; font-size: 11px; }
.sharoshi-app .plan-hero-stat { border-radius: 3px; background: #fff1; border-color: #fff3; color: #e3e9df; padding: 5px 9px; }
.sharoshi-app .plan-hero-stat b { color: #fff; }
.sharoshi-app .plan-hero-actions { margin-top: 10px; }
.sharoshi-app .plan-hero-btn { background: #f0e0bb; color: #344534; border: 1px solid #dfc58d; border-radius: 3px; box-shadow: none; font-size: 12px; }
.sharoshi-app .plan-hero-btn.is-todo { animation: none; box-shadow: none; background: #f0e0bb; color: #344534; border-color: #dfc58d; }
.sharoshi-app .plan-hero-link { color: #e3e9df; font-size: 12px; }
.home-journey { border: 1px solid #d8dfd1; background: #fffefa; padding: 4px 24px; border-radius: 8px; }
.journey-week { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 0; }
.journey-week > div strong { display: block; font-size: 12px; }
.journey-week > div > span { display: block; margin-top: 3px; font-size: 10px; color: #687565; }
.journey-week ol { display: flex; gap: 11px; padding: 0; margin: 0; list-style: none; }
.journey-week li { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.journey-week li > span:first-child { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid #dbe2d4; background: #f7f8f3; border-radius: 50%; color: #9aa58e; }
.journey-week li.is-active > span:first-child { color: #fff; background: #477758; border-color: #477758; }
.journey-week small { color: #65745e; font-size: 9px; }
.journey-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sharoshi-app .home-card { box-shadow: none; border-radius: 7px; border: 1px solid #dbe1d6; padding: 22px; background: #fffefa; }
.sharoshi-app .home-card h2 { font-size: 17px; }
.sharoshi-app .home-guide { color: #63715e; font-size: 11px; background: #f6f7f0; padding: 10px; border: 0; }
.sharoshi-app .home-today-item { box-shadow: none; border: 1px solid #e0e5da; border-radius: 3px; }
.sharoshi-app .home-today-item.is-done { opacity: 1; background: #eff5e8; }
.sharoshi-app .home-today-item.is-done .home-today-ask { text-decoration: none; }
.sharoshi-app .home-today-item.is-done .home-today-ask::before { content: '✓ '; color: #3d734b; }
.journey-atlas { border-top: 1px solid #cfd9c7; border-bottom: 1px solid #cfd9c7; padding: 18px 0; }
.journey-atlas > summary { display: flex; align-items: center; gap: 14px; cursor: pointer; list-style: none; }
.journey-atlas > summary::-webkit-details-marker { display: none; }
.journey-atlas > summary > strong { font-size: 17px; }
.journey-atlas > summary > span:last-child { margin-left: auto; font-size: 11px; white-space: nowrap; }
.journey-atlas[open] > summary { margin-bottom: 20px; }
.journey-landmarks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.journey-landmark { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border: 1px dashed #cbd5c4; color: #617059; background: #f1f3ec; }
.journey-landmark > span { font-size: 21px; }
.journey-landmark strong { font-size: 11px; }
.journey-landmark small { font-size: 10px; }
.journey-landmark.is-earned { color: #72582b; background: #faf2dc; border: 1px solid #c9b381; }
.sharoshi-app .journey-atlas-note { font-size: 11px; color: #65745e; margin: 12px 0 20px; }
.journey-cast { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.journey-person { display: flex; align-items: center; min-width: 0; gap: 14px; text-align: left; border: 1px solid #d8dfd1; border-radius: 4px; padding: 0 14px 0 0; background: #fffefa; color: #354b39; overflow: hidden; }
.journey-person:hover { border-color: #809272; background: #faf4e5; }
.journey-person img { display: block; width: 90px; height: 118px; flex-shrink: 0; object-fit: cover; object-position: top; background: linear-gradient(135deg, #e9e8db, #d4decf); }
.journey-person > span { min-width: 0; }
.journey-person small, .journey-person strong, .journey-person-record, .journey-person-action { display: block; }
.journey-person small { font-size: 10px; color: #6d795f; }
.journey-person strong { font: 700 17px/1.8 sans-serif; }
.journey-person-record { font-size: 10px; margin-top: 3px; }
.journey-person-theme { display: block; font-size: 10px; color: #69795c; margin: 3px 0 7px; }
.journey-person-action { color: #7c653b; font-size: 10px; margin-top: 10px; }
.sharoshi-app .search-band { background: #f0f4ec; }
.sharoshi-app .layout { grid-template-columns: minmax(120px, .65fr) minmax(190px, 1fr) minmax(0, 1.8fr); padding-left: 24px; padding-right: 24px; gap: 15px; }
.sharoshi-app .detail-panel { min-width: 0; overflow-wrap: anywhere; box-sizing: border-box; box-shadow: none; }
.sharoshi-app .detail-panel :is(table, pre) { max-width: 100%; overflow-x: auto; }
.sharoshi-app .exam-card { box-shadow: none; border-radius: 4px; }
.sharoshi-app .exam-layout { background: #fffefa; }
.sharoshi-app .exam-toolbar, .sharoshi-app .exam-filters { min-width: 0; box-sizing: border-box; }
.sharoshi-app .exam-filters { max-width: 100%; }
.sharoshi-app .exam-filters select { min-width: 0; max-width: 100%; }
.sharoshi-app .exam-index-toggle { display: none; }
.sharoshi-app .exam-detail { background: #fffefa; }
.sharoshi-app .exam-result-banner.is-correct { background: #e6f1df; border-color: #96b489; color: #305c38; }
.sharoshi-app .exam-result-banner { animation: journey-reveal .28s ease-out both; }
.sharoshi-app .text-group { background: #fffefa; border: 1px solid #dee2d6; margin-bottom: 15px; border-radius: 4px; overflow: hidden; scroll-margin-top: 100px; }
.sharoshi-app .text-group-head { padding: 17px 18px; border-bottom-width: 1px; }
.sharoshi-app .text-group-count { margin-left: auto; color: #65745e; font-size: 11px; }
.sharoshi-app .text-group-grid { padding: 16px; }
.sharoshi-app .text-card { border-radius: 4px; box-shadow: none; }
.sharoshi-app .text-card:hover { box-shadow: 0 5px 15px #2c492511; }
.sharoshi-app .flash-deck-picker { max-width: 800px; padding-top: 30px; }
.flash-deck-picker h2 { font: 700 clamp(22px, 2.4vw, 30px)/1.7 sans-serif; }
.flash-deck-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.sharoshi-app .flash-deck-btn { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 8px 10px; min-height: 160px; align-content: center; padding: 23px; border: 1px solid #d1ddc9; border-radius: 5px; box-shadow: none; background: #eef3e9; }
.sharoshi-app .flash-deck-btn:nth-child(2) { background: #f6f0e2; border-color: #e0d6bc; }
.sharoshi-app .flash-deck-btn:nth-child(3) { background: #edf2f6; border-color: #cddae0; }
.sharoshi-app .flash-deck-btn:nth-child(4) { background: #f3edef; border-color: #ddcfd4; }
.sharoshi-app .flash-deck-icon { grid-column: 1; grid-row: 1 / span 2; }
.sharoshi-app .flash-deck-name { grid-column: 2; grid-row: 1; }
.sharoshi-app .flash-deck-sub { grid-column: 2; grid-row: 2; font-size: 11px; color: #5e6c60; margin: 0; }
.sharoshi-app .flash-deck-count { grid-column: 2; grid-row: 3; margin-top: 8px; font-size: 11px; }
.sharoshi-app .flash-card { box-shadow: 0 12px 30px #35472e12; border-radius: 8px; }
.sharoshi-app .flash-complete h2 { font-size: 24px; }
.sharoshi-app .flash-complete { background: radial-gradient(ellipse at 50% 20%, #f2e7c9, transparent 70%); padding: 50px 22px; }
.sharoshi-app .flash-complete-actions { flex-wrap: wrap; }
.sharoshi-app #flashAgainBtn { background: #fffefa; color: #42603d; border: 1px solid #bdcbb5; }
.sharoshi-app .novel-stage { border-radius: 0; background-color: #192d28; }
.sharoshi-app .novel-card { border-radius: 5px; }
.sharoshi-app .law-card { box-shadow: none; border-radius: 4px; }
.sharoshi-app .map-canvas { border-radius: 0; }
.sharoshi-app .celebrate-close { border: 1px solid #ceb679; background: #f7edcc; color: #415537; padding: 11px 20px; border-radius: 4px; font-size: 13px; }
@keyframes journey-reveal { from { opacity: .3; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@media (min-width: 900px) {
  .sharoshi-app .plan-hero { grid-column: 1 / -1; grid-row: 1; }
  .home-journey { grid-column: 1 / -1; grid-row: 2; }
  .sharoshi-app .home-today { grid-column: 1; grid-row: 3 / span 2; }
  .sharoshi-app .home-prof { grid-column: 2; grid-row: 3; }
  .sharoshi-app .home-recent { grid-column: 2; grid-row: 4; }
  .sharoshi-app .home-plan { grid-column: 1 / -1; grid-row: 5; }
  .journey-atlas { grid-column: 1 / -1; grid-row: 6; }
  .sharoshi-app .home-coverage { grid-column: 1 / -1; grid-row: 7; }
  .sharoshi-app .home-analysis { grid-column: 1 / -1; grid-row: 8; }
}
@media (max-width: 1100px) {
  .sharoshi-app .plan-hero-chara { height: 160px; }
  .sharoshi-app .plan-hero-bubble::before { border-right-color: transparent; border-bottom-color: #faf9f0; }
}
@media (max-width: 1040px) {
  .sharoshi-app .layout { grid-template-columns: minmax(120px, .4fr) minmax(0, 1fr); }
}
@media (max-width: 1000px), (hover: none) and (pointer: coarse) {
  .sharoshi-app .exam-index-toggle { display: block; margin: 12px 14px 0; padding: 8px 14px; background: #f3f5ed; border: 1px solid #d5dfcb; border-radius: 3px; color: #42633e; font-size: 12px; }
  .sharoshi-app #examMode:not(.is-exam-index-open) .exam-list-wrap { display: none; }
}
@media (max-width: 820px) {
  .sharoshi-app { --journey-topbar-height: 48px; }
  .sharoshi-app .sidenav-list { padding-top: 0; }
  .sharoshi-app .sidenav-item { min-height: 44px; padding-left: 14px; gap: 7px; }
  .sharoshi-app .sidenav-item i svg { width: 18px; height: 18px; }
  .sharoshi-app .topbar { min-height: 48px; }
  .sharoshi-app .topbar-streak { font-size: 9px; padding: 4px 6px; }
  .sharoshi-app .topbar { gap: 6px; padding-left: 10px; padding-right: 10px; }
  .sharoshi-app .topbar-actions { min-width: 0; gap: 5px; }
  .sharoshi-app #screenToolsBtn { min-width: 0; max-width: 135px; }
  .sharoshi-app #screenToolsLabel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .sharoshi-app .topbar-title { font-size: 14px; }
  .sharoshi-app .home-wrap { padding: 20px 16px 40px; gap: 18px; }
  .home-journey { padding: 4px 15px; }
  .journey-week { align-items: flex-start; flex-direction: column; gap: 12px; }
  .journey-week ol { justify-content: space-between; width: 100%; gap: 8px; }
  .journey-atlas > summary { flex-wrap: wrap; gap: 6px; }
  .journey-landmarks { grid-template-columns: repeat(2, 1fr); }
  .journey-cast { grid-template-columns: 1fr; }
  .sharoshi-app .flash-deck-btn { padding: 16px; min-height: 150px; grid-template-columns: 1fr; gap: 7px; }
  .sharoshi-app .flash-deck-btn > span { grid-column: 1; grid-row: auto; }
  .sharoshi-app .flash-deck-icon { font-size: 22px; }
  .sharoshi-app .flash-deck-name { font-size: 14px; }
  .sharoshi-app .flash-deck-sub { font-size: 10px; }
  .sharoshi-app .flash-deck-count { margin: 0; font-size: 10px; }
}
@media (max-width: 640px), (hover: none) and (pointer: coarse) {
  body.app-shell #navBackBar { top: var(--journey-topbar-height); z-index: 19; }
}
@media (max-width: 720px) { .sharoshi-app .layout { grid-template-columns: minmax(0, 1fr); padding: 16px; } }
@media (max-width: 430px) {
  .sharoshi-app .plan-hero-chara { height: 145px; }
  .sharoshi-app .plan-hero-stat { font-size: 10px; padding: 4px 6px; }
  .sharoshi-app .plan-hero-stat b { font-size: 11px; }
  .sharoshi-app .plan-hero-line { font-size: 13px; }
  .sharoshi-app .home-card { padding: 17px; }
  .sharoshi-app .text-group-head { padding: 14px 12px; flex-wrap: wrap; gap: 8px; }
  .sharoshi-app .text-group-name { font-size: 15px; }
  .sharoshi-app .text-group-count { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sharoshi-app *, .sharoshi-app *::before, .sharoshi-app *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
