/* WaDaily の紹介サイトを「机の上」にする。
   既定は全部のウィンドウを縦に並べた普通のページ（JavaScript なし・スマホ）。
   ノートPC 以上の画面では desk.js が html.desk を付け、アイコンから開くデスクトップになる。 */
:root {
  --desk: #f3c27c;
  --desk-shade: #ecb265;
  --menu: 34px;
  --ui: "MS Gothic", "ＭＳ ゴシック", "WaDaily UD Gothic", monospace;
}
body {
  background-color: var(--desk);
  background-image:
    linear-gradient(45deg, var(--desk-shade) 25%, transparent 25%, transparent 75%, var(--desk-shade) 75%),
    linear-gradient(45deg, var(--desk-shade) 25%, transparent 25%, transparent 75%, var(--desk-shade) 75%);
  background-size: 4px 4px;
  background-position: 0 0, 2px 2px;
}
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.menu-clock, .desk-icons { display: none; }
.layout-toggle { min-height: 44px; padding: 0 4px; border: 0; background: none; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; white-space: nowrap; }

/* ---- ウィンドウ ---- */
.win { --w: 640px; --x: max(216px, calc((100vw - var(--w)) / 2)); --y: calc(var(--menu) + 18px); }
main .win.win, html.desk footer.win {
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; min-width: 0; margin: 0; padding: 0;
  background: var(--paper); border: 1.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
}
.win-bar { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; height: 28px; padding: 0 8px; background: var(--paper); border-bottom: 1.5px solid var(--ink); color: var(--ink); }
.win-bar::before, .win-bar::after { content: ""; flex: 1; height: 13px; background: repeating-linear-gradient(to bottom, var(--ink) 0 1.5px, transparent 1.5px 4.5px); }
.win-title { order: 2; font: 13px/1 var(--ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-bar::after { order: 3; }
.win-close { display: none; order: 0; flex: 0 0 auto; width: 16px; height: 16px; padding: 0; background: var(--paper); border: 1.5px solid var(--ink); }
.win-close:hover, .win-close:active { background: var(--ink); }
.win-body { min-width: 0; padding: 24px 26px 28px; }

/* ---- 縦に並べる表示 ---- */
main { display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 28px 16px 44px; }
main .win.win { width: min(700px, 100%); }
main .hero.hero { display: flex; flex-direction: column; align-items: center; gap: 28px; width: 100%; padding: 0; }
.hero .hero-desk { position: relative; width: min(700px, 100%); max-width: none; margin: 0; padding: 0; }
.hero .desk-note { position: relative; top: auto; right: auto; width: fit-content; margin: 0 8px -20px auto; }
@media (min-width: 1500px) {
  html:not(.desk) main .win.win,
  html:not(.desk) .hero .hero-desk,
  html:not(.desk) .hero .hero-bottom { width: min(880px, 100%); }
  html:not(.desk) .appearance-lab .appearance-board { grid-template-columns: 1fr 1fr; gap: 28px; }
  html:not(.desk) .download-section .download-card { grid-template-columns: .85fr 1.15fr; gap: 36px; align-items: start; }
}
@media (min-width: 1920px) {
  html:not(.desk) main { gap: 32px; padding: 36px 24px 56px; }
  html:not(.desk) main .win.win,
  html:not(.desk) .hero .hero-desk,
  html:not(.desk) .hero .hero-bottom { width: min(980px, 100%); }
}
.win .core-proof, .win .real-screen-picker, .win .real-screen-stage { margin-inline: 0; }
.win .daily-ledger, .win .doodle-lab, .win .appearance-board, .win .study-demo-scene { margin-top: 24px; }
.win .faq-list, .win .flow-track { margin-top: 18px; }
.win .core-proof { margin-top: 28px; }
.win .study-demo { margin-top: 36px; }
.win .real-screens-head { margin-bottom: 20px; }
footer .win-bar { display: none; }
footer .win-body { display: contents; }

@media (max-width: 620px) {
  main { gap: 22px; padding: 20px 12px 36px; }
  main .hero.hero { gap: 22px; }
  .win-body { padding: 18px 16px 22px; }
}

/* ---- デスクトップ表示 ---- */
html.desk, html.desk body { height: 100%; overflow: hidden; }
html.desk main { display: block; padding: 0; }
html.desk main .hero.hero, html.desk .hero .hero-desk { display: contents; }

html.desk .site-header { position: fixed; z-index: 5000; inset: 0 0 auto 0; height: var(--menu); min-height: 0; gap: 18px; padding: 0 12px; border-bottom: 1.5px solid var(--ink); font-family: var(--ui); }
html.desk .brand { font-size: 15px; gap: 6px; letter-spacing: 0; }
html.desk .brand-mark { width: 20px; height: 20px; }
html.desk .brand small { display: none; }
html.desk .site-nav { display: flex; margin-left: 4px; gap: 16px; }
html.desk .site-nav a { min-height: var(--menu); padding: 0 4px; font-size: 13px; font-weight: 400; }
html.desk .site-nav a:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
html.desk .header-download { display: inline-flex; margin-left: auto; min-height: 24px; padding: 2px 10px; border-radius: 0; box-shadow: none; font-size: 12px; font-weight: 400; }
html.desk .menu-clock { display: block; font-size: 13px; }
html.desk .layout-toggle { min-height: var(--menu); font-family: var(--ui); }

html.desk .desk-icons { display: grid; position: fixed; left: 12px; top: calc(var(--menu) + 12px); grid-template-columns: repeat(2, 96px); grid-auto-rows: 70px; gap: 4px; }
.desk-icon { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 5px 2px; text-decoration: none; font: 12px/1.35 var(--ui); text-align: center; }
.desk-icon svg, .desk-icon img { width: 36px; height: 36px; }
.desk-icon svg { fill: none; stroke: var(--ink); stroke-width: 1; shape-rendering: crispEdges; }
.ic-fill { fill: #fffaf0; }
.ic-accent { fill: #f08a24; }
.ic-sea { fill: #217e96; }
.desk-icon span { padding: 1px 5px; background: var(--paper); }
.desk-icon:hover span, .desk-icon:focus-visible span { background: var(--ink); color: var(--paper); }
.desk-icon:focus-visible { outline: none; }

html.desk main .win.win, html.desk footer.win {
  position: fixed; display: none; left: var(--x); top: var(--y);
  width: var(--w); max-width: calc(100vw - 24px); max-height: calc(100vh - var(--y) - 12px);
}
html.desk main .win.win.open, html.desk footer.win.open { display: flex; }
html.desk .win:focus { outline: none; }
html.desk .win-close { display: block; }
html.desk .win-bar { cursor: grab; user-select: none; touch-action: none; }
html.desk .win:not(.active) .win-bar::before, html.desk .win:not(.active) .win-bar::after { visibility: hidden; }
html.desk .win-body { overflow: auto; overscroll-behavior: contain; }

/* ノートPC〜FHD〜WQHD〜4Kまで画面幅・高さに応じて初期2ウィンドウと各ウィンドウを自然に配置する */
html.desk {
  --rail: 224px;
  --pair-gap: clamp(16px, 1.5vw, 32px);
  --readme-w: clamp(400px, 24vw, 480px);
  --shots-w: min(
    1460px,
    calc(100vw - var(--rail) - var(--readme-w) - var(--pair-gap) - 24px),
    calc((100vh - var(--menu) - 210px) * 1.667 + 28px)
  );
  --pair-x: max(var(--rail), calc(var(--rail) + (100vw - var(--rail) - var(--readme-w) - var(--pair-gap) - var(--shots-w)) / 2));
  --shots-est-h: calc((var(--shots-w) - 28px) * 0.6 + 172px);
  --pair-y: clamp(
    calc(var(--menu) + 18px),
    calc(var(--menu) + (100vh - var(--menu) - max(600px, var(--shots-est-h))) * 0.42),
    calc(var(--menu) + 170px)
  );
}
html.desk .win {
  --x: max(var(--rail), calc(var(--rail) + (100vw - var(--rail) - var(--w)) / 2));
  --y: clamp(calc(var(--menu) + 18px), calc(var(--menu) + 4vh), calc(var(--menu) + 84px));
}

html.desk [data-win="readme"] { --w: var(--readme-w); --x: var(--pair-x); --y: var(--pair-y); }
html.desk [data-win="home"] { --w: 560px; --x: min(752px, calc(100vw - 580px)); --y: calc(var(--menu) + 18px); }
html.desk [data-win="daily"] { --w: min(720px, calc(100vw - var(--rail) - 24px)); --y: clamp(calc(var(--menu) + 36px), calc(var(--menu) + 5vh), calc(var(--menu) + 96px)); }
html.desk [data-win="core"] { --w: min(1200px, calc(100vw - var(--rail) - 24px)); }
html.desk [data-win="report"] { --w: min(760px, calc(100vw - var(--rail) - 24px)); --y: clamp(calc(var(--menu) + 48px), calc(var(--menu) + 6vh), calc(var(--menu) + 110px)); }
html.desk [data-win="flow"] { --w: min(840px, calc(100vw - var(--rail) - 24px)); --y: clamp(calc(var(--menu) + 54px), calc(var(--menu) + 7vh), calc(var(--menu) + 120px)); }
html.desk [data-win="shots"] { --w: var(--shots-w); --x: calc(var(--pair-x) + var(--readme-w) + var(--pair-gap)); --y: var(--pair-y); }
html.desk [data-win="doodle"] { --w: min(1060px, calc(100vw - var(--rail) - 24px)); --y: clamp(calc(var(--menu) + 28px), calc(var(--menu) + 4.5vh), calc(var(--menu) + 88px)); }
html.desk [data-win="appearance"] { --w: min(1100px, calc(100vw - var(--rail) - 24px)); }
html.desk [data-win="features"] { --w: min(900px, calc(100vw - var(--rail) - 24px)); --y: clamp(calc(var(--menu) + 36px), calc(var(--menu) + 5vh), calc(var(--menu) + 96px)); }
html.desk [data-win="download"] { --w: min(1100px, calc(100vw - var(--rail) - 24px)); }
html.desk [data-win="android"] { --w: min(1100px, calc(100vw - var(--rail) - 24px)); --y: clamp(calc(var(--menu) + 24px), calc(var(--menu) + 4vh), calc(var(--menu) + 84px)); }
html.desk [data-win="faq"] { --w: min(800px, calc(100vw - var(--rail) - 24px)); }
html.desk [data-win="about"] { --w: min(600px, calc(100vw - var(--rail) - 24px)); --y: clamp(calc(var(--menu) + 60px), calc(var(--menu) + 8vh), calc(var(--menu) + 130px)); }

html.desk .hero .desk-note { position: fixed; z-index: 9; left: 10px; top: calc(var(--menu) + 12px + 7 * 74px + 4px); margin: 0; min-width: 196px; }
/* アイコンが 12 個で 6 段埋まるので、mikan.scr は 7 段目の左に置く。 */
html.desk .hero .hero-play { position: fixed; left: 12px; top: calc(var(--menu) + 12px + 6 * 74px); width: 196px; }
html.desk .hero .hero-bottom { display: none; }
html.desk .hero-demo-link { display: none; }


html.desk .core-feature-section .win-body { display: grid; grid-template-columns: 370px minmax(0, 1fr); gap: 28px 34px; align-items: start; }
html.desk .core-feature-section .study-demo { grid-column: 2; margin: 0; }
html.desk .core-feature-section .core-proof { grid-column: 1 / -1; margin-top: 0; }
html.desk .doodle-section .win-body { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 30px; align-items: center; }
html.desk .doodle-section .doodle-copy { display: block; }
html.desk .doodle-section .break-mascot { margin-top: 20px; }
html.desk .doodle-section .doodle-lab { margin-top: 0; }
html.desk .appearance-lab .appearance-board { grid-template-columns: 1fr 1fr; gap: 32px; }
html.desk .download-section .download-card { grid-template-columns: .8fr 1.2fr; gap: 44px; }
html.desk .android-section .win-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
html.desk .android-section .android-gallery { margin-top: 0; grid-template-columns: auto minmax(0, 1fr); align-items: center; justify-items: start; gap: 22px; }
html.desk .android-section .android-phone { width: clamp(232px, calc((100vh - var(--menu) - 135px) * .48), 276px); }
html.desk .android-section .android-info { text-align: left; }
html.desk .android-section .android-hint { font-size: 15px; }
html.desk .android-section .android-exclusives { grid-column: 1 / -1; margin-top: 4px; }

html.desk footer.win { grid-template-columns: none; gap: 0; border-top: 1.5px solid var(--ink); }
html.desk footer .win-bar { display: flex; }
html.desk footer .win-body { display: block; }


.hero .hero-bottom { width: min(700px, 100%); }
.win-body.desk-screen { padding: 0; }
html.desk footer.win { text-align: left; justify-items: start; }
html.desk .download-section .download-card { align-items: start; }

/* ---- 机の上の小物 ---- */
main .win.win[data-win="trash"] { display: none; }
html.desk #win-home { display: none !important; }
html.desk .hero-play { flex-direction: row; flex-wrap: nowrap; gap: 4px; }
html.desk .hero-play button { flex-direction: column; gap: 4px; width: 96px; min-height: 0; padding: 5px 2px; background: none; border: 0; font-size: 12px; }
html.desk .hero-play button svg { width: 36px; height: 36px; }
html.desk .hero-play button span { padding: 1px 5px; background: var(--paper); color: var(--ink); }
html.desk .hero-play button:hover span { background: var(--ink); color: var(--paper); }
html.desk .hero-play > span:not(.sr-only) { display: none; }
html.desk .hero h1 { font-size: 30px; }

/* スクショは開いた直後の主役。上にタブ、下に大きく画像。 */
html.desk .real-screens-section .win-body { padding: 10px 12px 12px; }
html.desk .real-screens-section .real-screens-head { margin: 0 0 6px; }
html.desk .real-screens-section .real-screens-head h2 { display: none; }
html.desk .real-screens-section .real-screens-head > p { margin: 0; font-size: 12px; }
html.desk .real-screens-section .real-screen-picker { gap: 3px; }
html.desk .real-screens-section .real-screen-picker button { min-height: 28px; padding: 2px 4px; font-size: 12px; }
html.desk .real-screens-section .real-screen-stage { margin-top: 6px; }
html.desk .real-screens-section .real-screen-panel figcaption { padding: 4px 10px; font-size: 12px; }

/* ---- スマホ：ウィンドウをタイトルだけに畳んで並べる ---- */
html.fold main, html.fold main .hero.hero { gap: 10px; }
html.fold main .win-bar { height: 46px; cursor: pointer; }
html.fold main .win-bar::before { display: none; }
html.fold main .win-title { font-size: 15px; }
html.fold main .win-title::before { content: "▶"; display: inline-block; width: 1.4em; font-size: 11px; }
html.fold main .win.open .win-title::before { content: "▼"; }
html.fold main .win:not(.open) .win-bar { border-bottom: 0; }
html.fold main .win:not(.open) .win-body { display: none; }
html.fold main .win-bar:focus-visible { outline: 2px dotted var(--ink); outline-offset: -5px; }
html.fold .hero .desk-note { margin-bottom: 0; }
html.desk #screensaver-button svg { width: 36px; height: 36px; }

/* ---- ファイル名はアイコンの枠に入れる（地の文に置かない） ---- */
.hero-play { flex-wrap: wrap; align-items: flex-start; gap: 4px 6px; }
.hero-play .file-icon, html.desk .hero-play .file-icon {
  display: flex; flex-direction: column; align-items: center; gap: 4px; width: 96px; min-height: 0; padding: 5px 2px;
  background: none; border: 0; border-radius: 0; box-shadow: none; color: var(--ink); font: 12px/1.35 var(--ui);
}
.hero-play .file-icon svg, .hero-play #screensaver-button svg { width: 36px; height: 36px; fill: none; stroke: var(--ink); stroke-width: 1; shape-rendering: crispEdges; }
.hero-play .file-icon span { padding: 1px 5px; background: var(--paper); color: var(--ink); }
.hero-play .file-icon:hover, .hero-play .file-icon:active { background: none; color: var(--ink); }
.hero-play .file-icon:hover span, .hero-play .file-icon:focus-visible span { background: var(--ink); color: var(--paper); }
.hero-play .file-icon:focus-visible { outline: none; }
html.desk #trash-button { display: none; }

/* WQHD・4Kなどの大画面では左アイコン列と文字をゆったりさせ、余白の偏りを抑える */
@media (min-width: 1800px) and (min-height: 1050px) {
  html.desk { --rail: 252px; }
  html.desk .site-header { padding: 0 20px; gap: 22px; }
  html.desk .desk-icons { left: 18px; top: calc(var(--menu) + 20px); grid-template-columns: repeat(2, 108px); grid-auto-rows: 86px; gap: 8px 6px; }
  html.desk .desk-icon, html.desk .hero-play .file-icon { gap: 5px; font-size: 13px; }
  html.desk .desk-icon span, html.desk .hero-play .file-icon span { padding: 2px 6px; }
  html.desk .desk-icon svg, html.desk .desk-icon img, html.desk .hero-play .file-icon svg, html.desk #screensaver-button svg { width: 42px; height: 42px; }
  html.desk .hero .hero-play { left: 18px; top: calc(var(--menu) + 20px + 6 * 94px); width: 222px; gap: 6px; }
  html.desk .hero-play .file-icon { width: 108px; }
  html.desk .hero .desk-note { left: 16px; top: calc(var(--menu) + 20px + 7 * 94px + 14px); width: 224px; min-width: 224px; }
  html.desk [data-win="readme"] .win-body { padding: 26px 28px 30px; }
  html.desk .hero h1 { font-size: 34px; }
  html.desk .real-screens-section .win-body { padding: 12px 14px 14px; }
  html.desk .real-screens-section .real-screen-picker button { min-height: 32px; font-size: 13px; }
}
@media (min-width: 2200px) and (min-height: 1250px) {
  html.desk {
    --menu: 40px;
    --rail: 288px;
    --rail-top: clamp(calc(var(--menu) + 24px), calc(var(--pair-y) - 24px), 172px);
  }
  html.desk .site-header { padding: 0 24px; gap: 24px; }
  html.desk .brand { font-size: 16px; }
  html.desk .brand-mark { width: 22px; height: 22px; }
  html.desk .site-nav { gap: 20px; }
  html.desk .site-nav a, html.desk .menu-clock { font-size: 14px; }
  html.desk .header-download { min-height: 28px; padding: 3px 12px; font-size: 13px; }
  html.desk .layout-toggle { font-size: 13px; }
  html.desk .desk-icons { left: 22px; top: var(--rail-top); grid-template-columns: repeat(2, 122px); grid-auto-rows: 104px; gap: 12px 8px; }
  html.desk .desk-icon, html.desk .hero-play .file-icon { gap: 6px; font-size: 14px; line-height: 1.4; }
  html.desk .desk-icon span, html.desk .hero-play .file-icon span { padding: 2px 8px; }
  html.desk .desk-icon svg, html.desk .desk-icon img, html.desk .hero-play .file-icon svg, html.desk #screensaver-button svg { width: 48px; height: 48px; }
  html.desk .hero .hero-play { left: 22px; top: calc(var(--rail-top) + 6 * 116px); width: 252px; gap: 8px; }
  html.desk .hero-play .file-icon { width: 122px; }
  html.desk .hero .desk-note { left: 20px; top: calc(var(--rail-top) + 7 * 116px + 16px); width: 256px; min-width: 256px; padding: 14px 16px; }
  html.desk .hero .desk-note p { font-size: 15px; line-height: 1.65; }
}

/* 画面の高さが低いノートPC（715px以下）だけアイコン行を少し詰めて、開発メモが見切れないようにする */
@media (max-height: 715px) {
  html.desk .desk-icons { top: calc(var(--menu) + 8px); grid-auto-rows: 62px; gap: 2px; }
  html.desk .desk-icon, html.desk .hero-play .file-icon { gap: 3px; padding: 3px 2px; }
  html.desk .desk-icon svg, html.desk .desk-icon img, html.desk .hero-play .file-icon svg, html.desk #screensaver-button svg { width: 32px; height: 32px; }
  html.desk .hero .hero-play { top: calc(var(--menu) + 8px + 6 * 64px); gap: 2px; }
  html.desk .hero .desk-note { top: calc(var(--menu) + 8px + 7 * 64px + 6px); }
}
@media (max-height: 635px) {
  html.desk .desk-icons { top: calc(var(--menu) + 6px); grid-auto-rows: 54px; gap: 2px; }
  html.desk .desk-icon svg, html.desk .desk-icon img, html.desk .hero-play .file-icon svg, html.desk #screensaver-button svg { width: 26px; height: 26px; }
  html.desk .hero .hero-play { top: calc(var(--menu) + 6px + 6 * 56px); }
  html.desk .hero .desk-note { top: calc(var(--menu) + 6px + 7 * 56px + 4px); }
  html.desk .hero .desk-note p { min-height: 36px; margin-top: 4px; font-size: 13px; line-height: 1.5; }
  html.desk .hero .desk-note button { min-height: 36px; }
}

/* ---- ゴミ箱：一言と、中身のファイル ---- */
.trash-message { min-height: 3.2em; margin: 0 0 12px; padding: 8px 12px; background: #fff3c9; border: 1.5px solid var(--ink); font: 15px/1.6 var(--ui); }
.trash-files { margin: 0; padding: 0; list-style: none; border: 1.5px solid var(--ink); background: var(--paper); }
.trash-files li + li { border-top: 1px dotted var(--ink); }
.trash-file { text-decoration: none; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 4px 10px; background: none; border: 0; color: var(--ink); font: 13px/1.4 var(--ui); text-align: left; }
.trash-file svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 1; shape-rendering: crispEdges; }
.trash-file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trash-file-size { flex: none; color: var(--muted); font-size: 12px; }
.trash-file:hover, .trash-file:focus-visible { background: var(--ink); color: var(--paper); outline: none; }
.trash-file:hover svg, .trash-file:focus-visible svg { stroke: var(--paper); }
.trash-file:hover .trash-file-size, .trash-file:focus-visible .trash-file-size { color: var(--paper); }
html.desk [data-win=trash] { --w: 380px; --x: max(var(--rail), calc(100vw - var(--w) - 48px)); --y: clamp(calc(var(--menu) + 48px), calc(var(--menu) + 6vh), calc(var(--menu) + 110px)); }
/* スマホと「ふつうのページ」では、ゴミ箱アイコンを押すと画面の下から出てくる */
html:not(.desk) main .win.win[data-win=trash].is-popped { display: flex; position: fixed; z-index: 4000; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: auto; max-width: 520px; max-height: min(78vh, 560px); margin: 0 auto; }
html:not(.desk) [data-win=trash].is-popped .win-body { display: block; overflow: auto; }
html:not(.desk) [data-win=trash].is-popped .win-close { display: block; }
html:not(.desk) [data-win=trash].is-popped .win-bar { cursor: pointer; }

html.fold main [data-win=trash].is-popped .win-title::before { display: none; }

/* ---- スマホと「ふつうのページ」：mikan.scr とゴミ箱は、付箋の横に置いておく ---- */
html:not(.desk) .hero .hero-desk { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; }
html:not(.desk) .hero .hero-play { grid-column: 1; grid-row: 1; flex-wrap: nowrap; gap: 0; margin: 0 0 12px 0; }
html:not(.desk) .hero .desk-note { grid-column: 2; grid-row: 1; }
html:not(.desk) .hero #win-home { grid-column: 1 / -1; grid-row: 2; }
@media (max-width: 520px) {
  html:not(.desk) .hero .hero-desk { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  html:not(.desk) .hero .hero-play { grid-column: 1; grid-row: 1; flex-direction: row; flex-wrap: nowrap; justify-content: flex-start; gap: 4px; margin: 0; }
  html:not(.desk) .hero .hero-play .file-icon { width: 88px; }
  html:not(.desk) .hero .desk-note { grid-column: 1; grid-row: 2; width: 100%; min-width: 0; margin: 0; }
  html:not(.desk) .hero #win-home { grid-column: 1; grid-row: 3; }
}

/* ---- ボタン：角は四角、昔の OS みたいに左上が明るく右下が暗い。押すとへこむ。 ---- */
:root { --btn-face: #f1ecdd; --btn-light: #ffffff; --btn-dark: #a59d89; }
#make-it-fall,
.study-demo-toggle, .tool-clear, .palette-picker button, .site-effect-picker button, .mikan-controls button,
.real-screen-picker button, .demo-quiz button, .header-download, html.desk .header-download, .lightbox-close, .nav-toggle {
  border-radius: 0; border: 1.5px solid var(--ink); background: var(--btn-face); color: var(--ink);
  box-shadow: inset 2px 2px 0 var(--btn-light), inset -2px -2px 0 var(--btn-dark);
}
#make-it-fall:hover,
.study-demo-toggle:hover, .tool-clear:hover, .palette-picker button:hover, .site-effect-picker button:hover, .mikan-controls button:hover,
.real-screen-picker button:hover, .demo-quiz button:hover, .header-download:hover, html.desk .header-download:hover, .lightbox-close:hover, .nav-toggle:hover {
  background: #fbf6e8; color: var(--ink);
}
#make-it-fall:active,
.study-demo-toggle:active, .tool-clear:active, .palette-picker button:active, .site-effect-picker button:active, .mikan-controls button:active,
.real-screen-picker button:active, .demo-quiz button:active, .header-download:active, html.desk .header-download:active, .lightbox-close:active, .nav-toggle:active {
  background: #e4dece; color: var(--ink); box-shadow: inset 2px 2px 0 var(--btn-dark), inset -1px -1px 0 var(--btn-light);
}
.palette-picker button[aria-pressed="true"],
.palette-picker button[aria-pressed="true"]:hover,
.real-screen-picker button.active,
.real-screen-picker button.active:hover,
.study-demo-toggle[aria-pressed="true"],
.study-demo-toggle[aria-pressed="true"]:hover {
  background: var(--ink); color: var(--paper);
  box-shadow: inset 2px 2px 0 #000, inset -1px -1px 0 #5a5a5a;
}
.palette-picker button[aria-pressed="true"] i { border-color: var(--paper); }
.site-effect-picker #site-effects-stop { border: 0; background: none; box-shadow: none; }
#mikan-poke, #mikan-rest { font-family: var(--ui); }
.button, .button:hover { border-radius: 0; box-shadow: inset 2px 2px 0 #5a5a5a, inset -2px -2px 0 #000; }
.button:hover { background: #2e2e2e; color: var(--paper); }
.button:active { box-shadow: inset 2px 2px 0 #000, inset -1px -1px 0 #5a5a5a; }
.button.secondary, .button.secondary:hover {
  background: var(--btn-face); color: var(--ink);
  box-shadow: inset 2px 2px 0 var(--btn-light), inset -2px -2px 0 var(--btn-dark);
}
.button.secondary:hover { background: #fbf6e8; color: var(--ink); }
.button.secondary:active {
  background: #e4dece; color: var(--ink);
  box-shadow: inset 2px 2px 0 var(--btn-dark), inset -1px -1px 0 var(--btn-light);
}

/* ---- 見出しの文字：等幅だと英字の間がガタつくので、同じ系統で字幅の自然なものにする ---- */
:root { --head: "MS PGothic", "ＭＳ Ｐゴシック", "WaDaily UDP Gothic", sans-serif; }
h1, h2, h3, h4, .trash-message { font-family: var(--head); }

/* PC の机表示では「はじめに.txt」の高さを変えないよう、Android版の入口はボタンにせず 1 行の文字リンクにする。
   スマホ（畳んだ表示・縦に並べる表示）ではボタンのまま。 */
/* Store ボタンと同じ行の右に、スマホの絵と「Android版」を短く置く（ウィンドウの高さは以前のまま）。
   矢印は右の「スクショ」を指して見えるので付けない。 */
html.desk .hero-actions { flex-wrap: nowrap; align-items: center; gap: 14px; }
html.desk .hero-actions .android-download,
html.desk .hero-actions .android-download:hover,
html.desk .hero-actions .android-download:active {
  order: 2; flex: none; min-height: 44px; padding: 0; gap: 0;
  background: none; color: var(--ink); border: 0; border-radius: 0; box-shadow: none;
}
html.desk .hero-actions .android-download { gap: 5px; }
html.desk .hero-actions .android-download .platform-icon { width: 16px; height: 16px; }
html.desk .hero-actions .android-download .platform-copy small { display: none; }
html.desk .hero-actions .android-download .platform-copy b { font-size: 0; }
html.desk .hero-actions .android-download .platform-copy b::after {
  content: "Android版"; font: 13px var(--ui); text-decoration: underline; text-underline-offset: 4px;
}
html.desk .hero-actions .android-download:hover .platform-copy b::after { background: var(--ink); color: var(--paper); }
