/* 想像のタネ Phase 12.98 — 共通の機能画面デザイン
   Presentation-only layer for /novel, /story and /materials.
   Deliberately leave canvases, player stages, story text, fixed editing controls,
   hit-target sizes, storage, JS behavior, and user-authored content untouched. */
body.tane-path-novel,
body.tane-path-story,
body.tane-path-materials{
  --tane-retro-paper:#fffdf8;
  --tane-retro-bg:#efefe7;
  --tane-retro-top:#f8faf5;
  --tane-retro-bottom:#dfe9d7;
  --tane-retro-border:#b9c9b0;
  --tane-retro-soft-border:#d6e0d1;
  --tane-retro-ink:#425e3c;
  --tane-retro-muted:#718169;
  background-color:var(--tane-retro-bg);
  color:#40533d;
}
/* Identity / routing, matching the Phase 12.97 service pages. */
body.tane-path-novel .tane-route-shell,
body.tane-path-story .tane-route-shell,
body.tane-path-materials .tane-route-shell{
  background:linear-gradient(180deg,var(--tane-retro-top),var(--tane-retro-bottom));
  border-top:4px solid #8fa484;
  border-bottom:1px solid #adbea2;
  box-shadow:inset 0 1px #fff,0 2px 5px rgba(68,86,57,.08);
}
body.tane-path-novel .tane-route-inner,
body.tane-path-story .tane-route-inner,
body.tane-path-materials .tane-route-inner{
  max-width:1120px;
  gap:8px;
}
body.tane-path-novel .tane-route-where strong,
body.tane-path-story .tane-route-where strong,
body.tane-path-materials .tane-route-where strong{
  display:inline-block;
  padding:4px 8px;
  background:rgba(255,255,255,.73);
  border:1px solid #bfd0b4;
  border-radius:4px;
  color:#476642;
}
body.tane-path-novel .tane-route-tabs,
body.tane-path-story .tane-route-tabs,
body.tane-path-materials .tane-route-tabs{
  padding-top:3px;
  border-top:1px dotted #b7c6af;
}
body.tane-path-novel .tane-route-tabs>a,
body.tane-path-story .tane-route-tabs>a,
body.tane-path-materials .tane-route-tabs>a,
body.tane-path-novel .tane-route-more>summary,
body.tane-path-story .tane-route-more>summary,
body.tane-path-materials .tane-route-more>summary{
  border-color:#bac9b1;
  border-radius:6px;
  background:linear-gradient(#fffefa,#edf3e8);
  box-shadow:inset 0 1px #fff,0 1px 0 rgba(88,106,78,.08);
  color:#4a6543!important;
}
body.tane-path-novel .tane-route-tabs>a[aria-current="page"],
body.tane-path-story .tane-route-tabs>a[aria-current="page"],
body.tane-path-materials .tane-route-tabs>a[aria-current="page"],
body.tane-path-novel .tane-route-more.is-current>summary,
body.tane-path-story .tane-route-more.is-current>summary,
body.tane-path-materials .tane-route-more.is-current>summary{
  background:linear-gradient(#fffefa,#e1ecd9);
  border-color:#8ea985;
  color:#395a34!important;
}
body.tane-path-novel .tane-route-menu,
body.tane-path-story .tane-route-menu,
body.tane-path-materials .tane-route-menu{
  background:var(--tane-retro-paper);
  border-color:var(--tane-retro-border);
}
body.tane-path-novel .tane-route-menu a,
body.tane-path-story .tane-route-menu a,
body.tane-path-materials .tane-route-menu a{
  border:1px solid #d7e0d0;
  border-radius:5px;
  background:#fffefa;
  padding:9px 10px;
  min-height:40px;
}
body.tane-path-novel .tane-route-menu a:hover,
body.tane-path-story .tane-route-menu a:hover,
body.tane-path-materials .tane-route-menu a:hover{
  border-color:#afc7a6;
  background:#edf4e7;
}
/* Main backgrounds are similar but never repaint interactive artwork. */
body.tane-path-novel .library-view,
body.tane-path-novel .studio-view,
body.tane-path-story .shelf-surface,
body.tane-path-story .layout,
body.tane-path-materials .workspace{
  background-color:transparent;
}
/* -------- サウンドノベル -------- */
body.tane-path-novel .masthead{
  background:linear-gradient(180deg,#fffefa,#eef4e8);
  border-bottom:1px solid var(--tane-retro-border);
  box-shadow:inset 0 1px #fff;
}
body.tane-path-novel :is(.library-lead,.project-card,.pane,.settings-dialog form,.graph-shell){
  background:var(--tane-retro-paper);
  border:1px solid var(--tane-retro-border);
  border-radius:10px;
  box-shadow:0 7px 18px rgba(73,67,56,.055);
}
body.tane-path-novel .library-lead{
  background:linear-gradient(135deg,#fffef9 5%,#eef5e9 65%,#f7f2e9);
}
body.tane-path-novel :is(.pane-head,.studio-top,.section-head,.dialog-heading,.graph-header){
  border-bottom:1px dotted #b7c7af;
  color:var(--tane-retro-ink);
}
body.tane-path-novel .pane-head{
  background:linear-gradient(180deg,#f7faf4,#e5eedf);
  border:1px solid #d5e1ce;
  border-radius:6px;
  padding:9px 10px;
  margin-bottom:9px;
}
body.tane-path-novel .pane-head h2{color:#415f3b}
body.tane-path-novel :is(.studio-guide,.studio-quick-guide,.sources-note,.local-note,.pane-tip){
  border-color:var(--tane-retro-soft-border);
  color:#677961;
}
body.tane-path-novel :is(button:not(.primary):not(.danger),.myplace-return,.novel-return-link){
  border-radius:6px;
}
body.tane-path-novel :is(.editor-tabs button,.mobile-tabs button){
  border-radius:5px;
}
body.tane-path-novel :is(.editor-tabs .active,.mobile-tabs .selected){
  border-color:#9db490;
  background:#e9f3e3;
  color:#405e39;
}
body.tane-path-novel :is(.project-card,.library-lead) :is(h1,h2,strong){color:#3f5c39}
/* Keep visual novel player, cue effects, character silhouettes and overlays as authored. */

/* -------- テキスト作成（本棚・執筆・読書）-------- */
body.tane-path-story .shelf-header,
body.tane-path-story .topbar{
  background:linear-gradient(#fffefa,#eaf1e5);
  border-bottom-color:var(--tane-retro-border);
}
body.tane-path-story :is(.shelf-hero,.shelf-feature,.shelf-section,.local-box,.release-box,.editor-fields,.reader-paper,.intro,.mainarea>.tabs,.panel){
  border-color:var(--tane-retro-border);
  box-shadow:0 7px 18px rgba(73,67,56,.05);
}
body.tane-path-story :is(.shelf-hero,.shelf-feature,.shelf-section,.local-box,.release-box,.editor-fields,.intro,.panel){
  background:var(--tane-retro-paper);
  border-radius:10px;
}
body.tane-path-story .shelf-hero{
  background:linear-gradient(135deg,#fffef9,#eef5e9 65%,#f6f1e8);
}
body.tane-path-story :is(.section-head,.local-box-head,.release-heading,.editor-heading,.reader-topline){
  border-bottom:1px dotted #b7c7af;
  color:var(--tane-retro-ink);
}
body.tane-path-story :is(.shelf-button,.filter,.local-box a,.tabs button,.plain-button,.top-link,.reading-settings button){
  border-radius:6px;
}
body.tane-path-story :is(.shelf-button:not(.strong),.filter,.plain-button,.reading-settings button){
  border:1px solid #bbcbb1;
  background:linear-gradient(#fffefa,#edf3e8);
  color:#4b6444;
}
body.tane-path-story :is(.shelf-button.strong,.filter.active){
  border-color:#618157;
  background:#66865d;
  color:#fff;
}
body.tane-path-story :is(.tabs button[aria-selected="true"],.filter.active){
  box-shadow:inset 0 -2px 0 rgba(255,255,255,.2);
}
body.tane-path-story .reader-paper{
  /* Reading surface intentionally stays plain, spacious and paper-colored. */
  background:#fffdfa;
}
body.tane-path-story :is(.search-field input,.editor-field input,.editor-field textarea,.editor-field select){
  border-color:#bfceba;
  border-radius:6px;
  background:#fffefa;
}
body.tane-path-story .layout .intro{
  border:1px solid var(--tane-retro-border);
  background:linear-gradient(180deg,#fffefa,#f5f7ef);
  border-radius:10px;
}
body.tane-path-story .layout .mainarea>.tabs{
  background:linear-gradient(#f8faf5,#e5eedf);
  border-radius:8px;
}
body.tane-path-story .layout .tabs button[aria-selected="true"]{
  background:#fffefa;
  border:1px solid #b1c5a6;
  color:#3f5e3b;
}
/* Reader font size and line spacing remain at the author's existing defaults. */

/* -------- 素材工房 -------- */
body.tane-path-materials .intro{
  background:linear-gradient(135deg,#fffef9,#edf5e7);
  border:1px solid var(--tane-retro-border);
  border-radius:10px;
  box-shadow:0 7px 18px rgba(73,67,56,.045);
}
body.tane-path-materials :is(.maker-pane,.library-pane,.layer-panel,.starter-panel,.adjust-sheet-panel,dialog){
  background:var(--tane-retro-paper);
  border:1px solid var(--tane-retro-border);
  border-radius:10px;
  box-shadow:0 8px 20px rgba(73,67,56,.065);
}
body.tane-path-materials :is(.panel-head,.starter-heading,.canvas-heading,.adjust-sheet-head,.dialog-head){
  background:linear-gradient(#f7faf4,#e4edde);
  border:1px solid #d0dec8;
  border-radius:6px;
  color:#415d3b;
  padding:9px 11px;
}
body.tane-path-materials :is(.panel-head h2,.starter-heading h3,.canvas-heading strong){color:#435e3c}
body.tane-path-materials :is(.toolgroup button,.settings button,.texttools button,.detail-actions button,.filters select,.filters input,.saveform input,.saveform select,.filebutton){
  border-radius:6px;
  border-color:#bfcdb8;
}
body.tane-path-materials :is(.toolgroup button.on,.filters button.on){
  background:#e7f1e0;
  color:#3f603a;
  border-color:#8fab83;
}
body.tane-path-materials :is(.toolgroup,.settings,.upload-box,.filters,.backup-tools,.saveform){
  border-color:var(--tane-retro-soft-border);
}
body.tane-path-materials :is(.asset-card,.asset-item,.template-card,.template-option){
  border-color:#cbd9c4;
  border-radius:8px;
}
/* Keep drawing canvas touch-action, transforms and coordinates unchanged. */
body.tane-path-novel :is(a,button,input,textarea,select):focus-visible,
body.tane-path-story :is(a,button,input,textarea,select):focus-visible,
body.tane-path-materials :is(a,button,input,textarea,select):focus-visible{
  outline:2px solid #719767;
  outline-offset:2px;
}
@media(max-width:610px){
  body.tane-path-novel .tane-route-tabs>a,
  body.tane-path-story .tane-route-tabs>a,
  body.tane-path-materials .tane-route-tabs>a,
  body.tane-path-novel .tane-route-more>summary,
  body.tane-path-story .tane-route-more>summary,
  body.tane-path-materials .tane-route-more>summary{
    padding:7px 7px;
    font-size:10px;
  }
  body.tane-path-novel .pane-head,
  body.tane-path-materials :is(.panel-head,.starter-heading,.canvas-heading){
    padding:8px;
  }
  body.tane-path-novel .studio-top{gap:10px}
}

/* Phase 12.99: the local bookshelf action is distinguishable from export/play. */
body.tane-path-novel #shelveNovelBtn{background:#eef4e8;border:1px solid #9db48f;color:#40603a;font-weight:800}
body.tane-path-novel #shelveNovelBtn[aria-pressed="true"]{background:#dcebd3;border-color:#719367}
body.tane-path-novel #shelveNovelBtn:disabled{background:#f5f3ee;border-color:#d3d2c8;color:#7b8177}
