🔬 AI発明ギャラリー › ユーザー30 › 推しプロフ図鑑を自由につくろう!
🔒 サンドボックス内で実行中 ⛶ 全画面で遊ぶ
HTML / CSS / JS
<!doctype html>
<html lang="ja">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
<title>推し図鑑</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Kaisei+Decol:wght@400;700&family=Yomogi&family=Zen+Maru+Gothic:wght@400;500;700&display=swap">
<style>
/* 夜の机とランプ。真ん中にひらいたアルバムが1冊。紙は点線ノート、ページごとに推しのメンバーカラーが差し色になる */
@property --glowc { syntax: "<color>"; inherits: true; initial-value: #8a6cff; }
:root{
  --desk:#17122a; --desk-2:#251d40; --lamp:#ffd9a8;
  --paper:#fdfaf7; --paper-dot:#e4dbe8; --paper-edge:#ddd3cc;
  --ink:#2d2536; --ink-soft:#71677c;
  --cloth:#4b1e40; --cloth-2:#3a1532; --foil:#e9c47e;
  --ui:#fffaf4; --ui-ink:#2d2536; --ui-line:#e6dcd3; --ui-accent:#7a3a6c;
  --bar:#ffffff14; --bar-line:#ffffff24; --bar-ink:#f4eefc;
  --display:"Kaisei Decol","Hiragino Mincho ProN","Yu Mincho",serif;
  --body:"Zen Maru Gothic","Hiragino Maru Gothic ProN","Hiragino Sans",sans-serif;
  --hand:"Yomogi","Zen Maru Gothic",cursive;
  color-scheme:dark;
}
html,body{height:100%}
body{margin:0;background:var(--desk);color:var(--bar-ink);font-family:var(--body);overflow:hidden;-webkit-tap-highlight-color:transparent}
button{font:inherit;color:inherit;cursor:pointer}
:focus-visible{outline:2px solid var(--foil);outline-offset:2px}

.app{height:100%;display:grid;grid-template-rows:auto 1fr auto;
  padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px));padding-block:10px;box-sizing:border-box;
  background:
    radial-gradient(60% 55% at 50% 48%, color-mix(in oklab, var(--glowc) 22%, transparent), transparent 70%),
    radial-gradient(90% 70% at 50% 0%, #ffd9a812, transparent 60%),
    linear-gradient(180deg,var(--desk-2),var(--desk));
  transition:--glowc 1.2s ease;}

/* top bar */
.topbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:space-between}
.brand{display:flex;align-items:baseline;gap:10px;min-width:0}
.brand b{font-family:var(--display);font-size:20px;letter-spacing:.08em;color:var(--foil)}
.brand span{font-size:12px;color:#c9bfdb;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tools{display:flex;gap:6px;flex-wrap:wrap}
.tbtn{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--bar-line);background:var(--bar);border-radius:999px;padding:7px 13px;font-size:13px;line-height:1;backdrop-filter:blur(6px)}
.tbtn:hover{background:#ffffff22}
.tbtn:disabled{opacity:.4;cursor:default}
.tbtn[aria-pressed="true"]{background:var(--foil);color:#3a2410;border-color:var(--foil)}
.tbtn .ic{font-size:14px}
.eq{display:inline-flex;gap:2px;align-items:flex-end;height:12px}
.eq i{width:2px;height:4px;background:currentColor;border-radius:1px}
.tbtn[aria-pressed="true"] .eq i{animation:eq .9s ease-in-out infinite}
.tbtn[aria-pressed="true"] .eq i:nth-child(2){animation-delay:-.3s}
.tbtn[aria-pressed="true"] .eq i:nth-child(3){animation-delay:-.6s}
@keyframes eq{0%,100%{height:3px}50%{height:12px}}

/* stage + book */
.stage{position:relative;display:grid;place-items:center;perspective:2400px;overflow:hidden;min-height:0;touch-action:pan-y}
.book-wrap{transform-style:preserve-3d;transform:rotateX(var(--rx,10deg)) rotateY(var(--ry,0deg));transition:transform .4s ease-out}
.book{position:relative;transform-style:preserve-3d;transform:translateX(var(--shift,0%));transition:transform .85s cubic-bezier(.45,.05,.25,1)}
.book::after{content:"";position:absolute;left:4%;right:4%;bottom:-7%;height:12%;background:radial-gradient(closest-side,#0009,transparent);transform:translateZ(-2px);pointer-events:none}
.stack{position:absolute;top:0;height:100%;background:var(--paper);border-radius:3px;transition:box-shadow .6s,opacity .3s}
.leaf{position:absolute;top:0;left:50%;width:50%;height:100%;transform-origin:left center;transform-style:preserve-3d;transition:transform .9s cubic-bezier(.45,.05,.25,1)}
.single .leaf{left:0;width:100%}
.single .stack-l{display:none}
.no-anim .leaf,.no-anim.book{transition:none!important}
.face{position:absolute;inset:0;overflow:hidden;container-type:size;backface-visibility:hidden;-webkit-backface-visibility:hidden;background:var(--paper);color:var(--ink);box-sizing:border-box}
.face.front{border-radius:0 1.4cqw 1.4cqw 0}
.face.back{transform:rotateY(180deg);border-radius:1.4cqw 0 0 1.4cqw}
.paper{background-color:var(--paper);background-image:radial-gradient(circle, var(--paper-dot) .32cqw, transparent .4cqw);background-size:5cqw 5cqw;background-position:2.5cqw 2.5cqw}
.face::before{content:"";position:absolute;inset:0;pointer-events:none;z-index:5}
.face.front::before{background:linear-gradient(90deg,#0000002a,#0000000a 4%,transparent 10%)}
.face.back::before{background:linear-gradient(270deg,#0000002a,#0000000a 4%,transparent 10%)}
.leaf.turning .face::after{content:"";position:absolute;inset:0;pointer-events:none;z-index:6;animation:shade .9s ease both}
.leaf.turning .face.front::after{background:linear-gradient(270deg,#00000040,transparent 70%)}
.leaf.turning .face.back::after{background:linear-gradient(90deg,#00000040,transparent 70%)}
@keyframes shade{0%{opacity:0}50%{opacity:1}100%{opacity:0}}

/* covers */
.cover{background:
   radial-gradient(120% 80% at 30% 15%, #ffffff1c, transparent 55%),
   repeating-linear-gradient(45deg,#ffffff06 0 .4cqw,transparent .4cqw .9cqw),
   repeating-linear-gradient(-45deg,#00000010 0 .4cqw,transparent .4cqw .9cqw),
   linear-gradient(160deg,var(--cloth),var(--cloth-2));color:var(--foil)}
.cover-frame{position:absolute;inset:6cqw;border:.5cqw double color-mix(in oklab,var(--foil) 70%,transparent);border-radius:1cqw;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:2.4cqw;padding:6cqw}
.cover-emblem{width:36cqw;color:var(--foil);filter:drop-shadow(0 .3cqw 0 #00000055)}
.cover-kicker{margin:0;font-size:3.2cqw;letter-spacing:.5em;padding-left:.5em;opacity:.85}
.cover-title{margin:0;font-family:var(--display);font-weight:700;font-size:10cqw;line-height:1.2;letter-spacing:.06em;text-wrap:balance;text-shadow:0 .25cqw 0 #00000066;
  background:linear-gradient(180deg,#fff1cc,var(--foil) 55%,#b98a3e);-webkit-background-clip:text;background-clip:text;color:transparent}
.cover-count{margin:0;font-size:3.6cqw;letter-spacing:.15em}
.cover-owner{margin:0;font-family:var(--hand);font-size:4.2cqw;min-height:1em}
.cover-hint{position:absolute;bottom:4cqw;left:0;right:0;margin:0;font-size:3cqw;opacity:.7;letter-spacing:.2em;animation:blink 2.4s ease-in-out infinite}
@keyframes blink{50%{opacity:.25}}
.bc-msg{margin:0;font-family:var(--hand);font-size:6cqw}
.cover-btn{border:1px solid var(--foil);background:transparent;color:var(--foil);border-radius:999px;padding:1.8cqw 5cqw;font-size:3.4cqw}
.blank{background-color:#f8f3ee}

/* photo page */
.photo-page{display:grid;place-items:center}
.polaroid{position:relative;margin:0;width:66cqw;background:#fff;padding:4cqw 4cqw 0;box-shadow:0 1.2cqw 2.4cqw #2d253633,0 .2cqw .4cqw #2d253622;transform:rotate(var(--tilt,-3deg));margin-top:-8cqw}
.pic{aspect-ratio:3/4;overflow:hidden;background:#eee;max-width:100%}
.pic img{width:100%;height:100%;object-fit:cover;display:block}
.ph{width:100%;height:100%;display:grid;place-items:center;position:relative;
  background:radial-gradient(circle at 28% 22%,#ffffffaa 0,transparent 35%),linear-gradient(160deg,color-mix(in oklab,var(--mc) 55%,white),var(--mc))}
.ph span{font-family:var(--display);font-size:30cqw;color:#ffffffee;text-shadow:0 .6cqw 1.6cqw #0000002e}
.ph small{position:absolute;bottom:3cqw;left:0;right:0;text-align:center;font-size:3cqw;color:#fff;opacity:.9}
.polaroid figcaption{font-family:var(--hand);font-size:6cqw;text-align:center;padding:2.6cqw 0 3.4cqw;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tape{position:absolute;top:-3cqw;left:50%;width:26cqw;height:7cqw;transform:translateX(-50%) rotate(4deg);background-color:color-mix(in srgb,var(--mc) 45%,white);opacity:.75;
  background-image:repeating-linear-gradient(90deg,#ffffff40 0 1cqw,transparent 1cqw 2cqw);box-shadow:0 .2cqw .4cqw #0000001a}
.catch{position:absolute;left:8cqw;right:8cqw;bottom:13cqw;margin:0;text-align:center;font-family:var(--display);font-size:4.6cqw;color:color-mix(in oklab,var(--mc) 65%,var(--ink));text-wrap:balance}
.doodle{position:absolute;color:var(--mc);font-size:6cqw;line-height:1;opacity:.85}
.folio{position:absolute;bottom:4cqw;font-size:2.8cqw;color:var(--ink-soft);font-variant-numeric:tabular-nums;letter-spacing:.1em}
.front .folio{right:6cqw}.back .folio{left:6cqw}
.stamp{display:inline-block;border:.4cqw solid #c8463c;color:#c8463c;border-radius:1cqw;padding:.3cqw 1.6cqw;font-size:3cqw;font-weight:700;transform:rotate(-8deg);letter-spacing:.1em}
.photo-page .stamp{position:absolute;top:6cqw;left:8cqw}

/* profile page */
.profile>.in{position:absolute;inset:0;box-sizing:border-box;display:flex;flex-direction:column;gap:2.2cqw;padding:7cqw 7cqw 9cqw 10cqw}
.pf-head{display:flex;align-items:center;gap:2.4cqw}
.pf-no{font-size:3.2cqw;letter-spacing:.2em;color:var(--ink-soft);font-variant-numeric:tabular-nums}
.pf-edit{margin-left:auto;border:1px solid var(--paper-edge);background:#fff;border-radius:999px;padding:1cqw 3cqw;font-size:3cqw;color:var(--ink)}
.pf-edit:hover{border-color:var(--mc)}
.pf-name{margin:0;font-family:var(--display);font-weight:700;font-size:8.6cqw;line-height:1.15;text-wrap:balance;overflow-wrap:anywhere}
.pf-kana{margin:-1cqw 0 0;font-family:var(--hand);font-size:3.6cqw;color:var(--ink-soft)}
.pf-group{margin:0;font-size:3.4cqw;color:var(--ink)}
.pf-ribbon{height:2cqw;background:var(--mc);border-radius:1cqw;position:relative;margin:.6cqw 0}
.pf-ribbon::after{content:attr(data-hex);position:absolute;right:0;top:2.6cqw;font-size:2.4cqw;color:var(--ink-soft);letter-spacing:.1em}
.pf-stats{display:grid;grid-template-columns:1fr 1fr;gap:2.4cqw;margin-top:1.6cqw}
.stat{background:#fff;border:1px solid var(--paper-edge);border-radius:1.6cqw;padding:2.2cqw 2.8cqw;display:flex;flex-direction:column;gap:.4cqw;min-width:0}
.stat .lbl,.memo .lbl{font-size:2.8cqw;letter-spacing:.15em;color:var(--ink-soft)}
.stat .val{display:flex;align-items:baseline;gap:1cqw;font-variant-numeric:tabular-nums}
.stat .num{font-family:var(--display);font-weight:700;font-size:8cqw;line-height:1;color:color-mix(in oklab,var(--mc) 70%,black)}
.stat .unit{font-size:3.2cqw}
.stat .sub{font-size:2.8cqw;color:var(--ink-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chips{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:1.4cqw}
.chips li{font-size:3cqw;padding:1cqw 2.4cqw;border-radius:999px;background:color-mix(in oklab,var(--mc) 16%,white);border:1px solid color-mix(in oklab,var(--mc) 50%,white)}
.memo{flex:1;min-height:0;display:flex;flex-direction:column;gap:1cqw}
.memo p{margin:0;flex:1;min-height:0;overflow:auto;font-family:var(--hand);font-size:3.7cqw;line-height:7cqw;
  background-image:linear-gradient(transparent calc(7cqw - 1px),color-mix(in oklab,var(--mc) 30%,#e6dde4) calc(7cqw - 1px));background-size:100% 7cqw;background-attachment:local;white-space:pre-wrap;overflow-wrap:anywhere}
.pf-song{display:flex;align-items:center;gap:2cqw;font-size:3cqw;color:var(--ink-soft);min-width:0}
.pf-song span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.song-btn{flex:none;width:7cqw;height:7cqw;border-radius:50%;border:none;background:var(--mc);color:#fff;font-size:3.6cqw;display:grid;place-items:center;box-shadow:0 .4cqw 0 color-mix(in oklab,var(--mc) 60%,black)}

/* index / add */
.index-page>.in{position:absolute;inset:0;box-sizing:border-box;padding:9cqw 7cqw 10cqw 9cqw;display:flex;flex-direction:column;gap:3cqw}
.ix-title{margin:0;font-family:var(--display);font-size:7cqw;letter-spacing:.3em}
.ix-list{list-style:none;margin:0;padding:0;overflow:auto;flex:1;min-height:0}
.ix-list button{width:100%;display:grid;grid-template-columns:auto auto 1fr;align-items:center;gap:0 2.4cqw;text-align:left;border:none;background:transparent;border-bottom:1px dashed var(--paper-edge);padding:2.4cqw 0}
.ix-list button:hover .ix-name{color:var(--ui-accent)}
.ix-no{font-size:2.8cqw;color:var(--ink-soft);font-variant-numeric:tabular-nums;letter-spacing:.1em}
.dot{width:3cqw;height:3cqw;border-radius:50%;background:var(--mc)}
.ix-name{font-family:var(--display);font-size:4.4cqw;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ix-group{grid-column:3;font-size:2.8cqw;color:var(--ink-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ix-empty{font-family:var(--hand);font-size:4cqw;color:var(--ink-soft)}
.ix-foot{margin:0;font-size:2.8cqw;color:var(--ink-soft)}
.add-page>.in{position:absolute;inset:0;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4cqw;padding:10cqw}
.add-card{width:100%;aspect-ratio:3/3.4;border:.6cqw dashed #c9b9c9;border-radius:3cqw;background:#ffffffa8;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2cqw;color:var(--ink);max-width:100%}
.add-card:hover{border-color:var(--ui-accent);background:#fff}
.add-card .plus{width:16cqw;height:16cqw;border-radius:50%;background:var(--ui-accent);color:#fff;display:grid;place-items:center;font-size:9cqw;line-height:1}
.add-card b{font-size:5cqw;font-family:var(--display)}
.add-card small{font-size:3cqw;color:var(--ink-soft)}
.ghost{border:1px solid var(--paper-edge);background:#fff;border-radius:999px;padding:2cqw 4.4cqw;font-size:3.2cqw;color:var(--ink)}

/* bottom nav */
.nav{display:flex;align-items:center;justify-content:center;gap:10px;padding-top:6px}
.nbtn{width:42px;height:42px;border-radius:50%;border:1px solid var(--bar-line);background:var(--bar);font-size:18px;display:grid;place-items:center}
.nbtn:disabled{opacity:.3;cursor:default}
.where{min-width:0;max-width:52vw;text-align:center;display:flex;flex-direction:column;gap:2px}
.where b{font-weight:500;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.where small{font-size:11px;color:#bdb2d2}

.sample-btn{align-self:center;border:1px solid var(--foil);background:transparent;color:var(--foil);border-radius:999px;padding:4px 12px;font-size:12px;margin-top:2px;white-space:nowrap}
.sample-btn:hover{background:#e9c47e22}
/* dialogs */
dialog.sheet{color-scheme:light;border:none;border-radius:20px;background:var(--ui);color:var(--ui-ink);padding:0;width:min(560px,calc(100vw - 32px));max-height:calc(100dvh - 32px);box-shadow:0 30px 80px #0008}
dialog.sheet::backdrop{background:#0d0a1ab3;backdrop-filter:blur(3px)}
.sheet-in{display:flex;flex-direction:column;gap:14px;padding:22px;overflow:auto;max-height:calc(100dvh - 32px);box-sizing:border-box}
.sheet-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.sheet-head h2{margin:0;font-family:var(--display);font-size:22px}
.x{border:none;background:transparent;font-size:13px;color:var(--ink-soft);padding:6px}
.field{display:flex;flex-direction:column;gap:5px;font-size:12px;color:var(--ink-soft);letter-spacing:.05em;min-width:0}
.field input:not([type=color]):not([type=file]),.field select,.field textarea,.sheet textarea{font:inherit;font-size:15px;color:var(--ui-ink);background:#fff;border:1px solid var(--ui-line);border-radius:10px;padding:9px 11px;letter-spacing:0;box-sizing:border-box;width:100%}
.field textarea{resize:vertical;line-height:1.7}
.row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media (max-width:460px){.row{grid-template-columns:1fr}}
.md{display:flex;align-items:center;gap:6px;color:var(--ui-ink);font-size:14px}
.md select{width:auto!important}
.photo-field{display:flex;gap:14px;align-items:center}
.photo-preview{width:84px;flex:none;aspect-ratio:3/4;border-radius:8px;overflow:hidden;background:#eee;container-type:size;--mc:#999}
.photo-preview img{width:100%;height:100%;object-fit:cover;display:block}
.photo-preview .ph span{font-size:44px}
.btns{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.file-btn{position:relative;display:inline-flex;align-items:center;border:1px solid var(--ui-line);background:#fff;border-radius:999px;padding:8px 14px;font-size:13px;color:var(--ui-ink);cursor:pointer;overflow:hidden}
.file-btn input{position:absolute;inset:0;opacity:0;cursor:pointer}
.file-btn:focus-within{outline:2px solid var(--ui-accent)}
.sbtn{border:1px solid var(--ui-line);background:#fff;border-radius:999px;padding:8px 14px;font-size:13px;color:var(--ui-ink)}
.sbtn:disabled{opacity:.4;cursor:default}
.primary{background:var(--ui-accent);border-color:var(--ui-accent);color:#fff;font-weight:700;padding:10px 22px}
.danger{color:#b8362c}
.swatches{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.sw{width:26px;height:26px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px var(--ui-line);padding:0}
.swatches input[type=color]{width:40px;height:30px;border:1px solid var(--ui-line);border-radius:8px;background:#fff;padding:2px}
.note{margin:0;font-size:12px;color:var(--ink-soft);line-height:1.7}
.sample-note{margin:0;font-size:13px;background:#fff1ee;border:1px solid #f3c9c2;color:#8a3128;border-radius:10px;padding:8px 12px}
.sheet-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;border-top:1px solid var(--ui-line);padding-top:14px}
.sheet section{display:flex;flex-direction:column;gap:10px;border-top:1px solid var(--ui-line);padding-top:14px}
.sheet h3{margin:0;font-size:14px}
.status{margin:0;font-size:12px;color:var(--ui-accent);min-height:1em}

.toast{position:fixed;left:50%;bottom:calc(80px + env(safe-area-inset-bottom,0px));transform:translate(-50%,20px);background:#fffaf4;color:var(--ui-ink);border-radius:999px;padding:9px 18px;font-size:13px;box-shadow:0 10px 30px #0006;opacity:0;pointer-events:none;transition:.3s;z-index:50;max-width:calc(100vw - 48px)}
.toast.show{opacity:1;transform:translate(-50%,0)}

@media (max-width:560px){.brand span{display:none}.tbtn .lbl-long{display:none}}
@media (prefers-reduced-motion:reduce){.leaf,.book,.book-wrap{transition-duration:.01s!important}.cover-hint{animation:none}.leaf.turning .face::after{animation:none}}
</style>

</head>
<body>
<div class="app" id="app">
  <header class="topbar">
    <div class="brand"><b>推し図鑑</b><span>ページをめくって推しに会いにいく本</span></div>
    <div class="tools">
      <button class="tbtn" id="music-btn" aria-pressed="false" title="音楽をつける/けす"><span class="eq" aria-hidden="true"><i></i><i></i><i></i></span><span>音楽</span></button>
      <button class="tbtn" id="add-btn"><span class="ic" aria-hidden="true">+</span><span>推し<span class="lbl-long">を追加</span></span></button>
      <button class="tbtn" id="edit-btn" disabled><span class="ic" aria-hidden="true">✎</span><span>編集</span></button>
      <button class="tbtn" id="settings-btn"><span class="ic" aria-hidden="true">⚙</span><span>本<span class="lbl-long">の設定</span></span></button>
    </div>
  </header>

  <main class="stage" id="stage">
    <div class="book-wrap" id="wrap"><div class="book" id="book"></div></div>
  </main>

  <nav class="nav">
    <button class="nbtn" id="prev" aria-label="前のページ">‹</button>
    <div class="where"><b id="where">表紙</b><small id="hint">ページをタップ・スワイプでめくれます</small><button class="sample-btn" id="clear-samples" hidden>見本を消して作りはじめる</button></div>
    <button class="nbtn" id="next" aria-label="次のページ">›</button>
  </nav>
</div>

<dialog class="sheet" id="editor">
  <form class="sheet-in" id="edit-form" novalidate>
    <div class="sheet-head"><h2 id="edit-title">推しを追加</h2><button type="button" class="x" data-close>閉じる</button></div>
    <p class="sample-note" id="sample-note" hidden>これは見本の推しです。自分の推しに書きかえるか、削除してください。</p>
    <div class="photo-field">
      <div class="photo-preview" id="photo-preview"></div>
      <div class="btns">
        <label class="file-btn">写真をえらぶ<input type="file" id="f-photo" accept="image/*"></label>
        <button type="button" class="sbtn" id="photo-clear">写真をはずす</button>
      </div>
    </div>
    <label class="field">または画像のURL<input id="f-photourl" type="url" inputmode="url" placeholder="https://…/photo.jpg" autocomplete="off"></label>
    <p class="note" style="margin-top:-8px">画像ファイルへの直接リンクに対応しています。選んだ写真とURLの両方があるときは、選んだ写真が優先されます。<br>※claude.ai上のページでは安全のため外部URLの画像は表示されません。ダウンロードしたHTMLファイルをブラウザで開くと表示できます。</p>
    <p class="note">入力はどれも自由です。空欄のままでも保存でき、あとからいつでも書きたせます。</p>
    <label class="field">名前<input id="f-name" maxlength="40" autocomplete="off"></label>
    <div class="row">
      <label class="field">よみがな<input id="f-kana" maxlength="40" autocomplete="off"></label>
      <label class="field">グループ・作品<input id="f-group" maxlength="60" autocomplete="off"></label>
    </div>
    <label class="field">キャッチコピー<input id="f-catch" maxlength="30" placeholder="例:夜空いちばんの歌声" autocomplete="off"></label>
    <div class="row">
      <div class="field">誕生日<span class="md"><select id="f-bm" aria-label="誕生月"></select>月<select id="f-bd" aria-label="誕生日"></select>日</span></div>
      <label class="field">推し始めた日<input type="date" id="f-since"></label>
    </div>
    <div class="field">メンバーカラー
      <div class="swatches" id="swatches"><input type="color" id="f-color" value="#ff8fb1" aria-label="色をえらぶ"></div>
    </div>
    <label class="field">好きなところ(「、」で区切る)<input id="f-tags" maxlength="120" placeholder="例:笑顔、低い声、ダンス" autocomplete="off"></label>
    <label class="field">推しポイント<textarea id="f-points" rows="4" maxlength="400" placeholder="好きになったきっかけ、忘れられない瞬間など"></textarea></label>
    <div class="field">テーマ曲
      <div class="btns">
        <label class="file-btn">音楽ファイルをえらぶ<input type="file" id="f-song" accept="audio/*"></label>
        <button type="button" class="sbtn" id="song-clear">はずす</button>
      </div>
      <p class="note" id="song-name">未設定:この推しだけのオルゴール曲を自動で作ります</p>
      <input id="f-songurl" type="url" inputmode="url" placeholder="または音楽のURL(https://…/song.mp3)" autocomplete="off" aria-label="テーマ曲のURL">
      <p class="note">mp3などの音楽ファイルへの直接リンクに対応しています(YouTubeなどの動画ページのURLは使えません)。ファイルとURLの両方があるときはファイルが優先されます。<br>※claude.ai上のページでは安全のため外部URLの音楽は再生されません。ダウンロードしたHTMLファイルをブラウザで開くと再生できます。</p>
    </div>
    <div class="sheet-foot">
      <div class="btns" id="manage">
        <button type="button" class="sbtn" id="move-prev">← 前へ</button>
        <button type="button" class="sbtn" id="move-next">後ろへ →</button>
        <button type="button" class="sbtn danger" id="del">削除</button>
        <span id="del-confirm" class="btns" hidden><span class="note">本当に削除しますか?</span><button type="button" class="sbtn danger" id="del-yes">削除する</button><button type="button" class="sbtn" id="del-no">やめる</button></span>
      </div>
      <button type="submit" class="sbtn primary">保存する</button>
    </div>
  </form>
</dialog>

<dialog class="sheet" id="settings">
  <div class="sheet-in">
    <div class="sheet-head"><h2>本の設定</h2><button type="button" class="x" data-close>閉じる</button></div>
    <div class="row">
      <label class="field">本のタイトル<input id="s-title" maxlength="20" autocomplete="off"></label>
      <label class="field">持ち主の名前<input id="s-owner" maxlength="20" autocomplete="off"></label>
    </div>
    <div class="btns"><button type="button" class="sbtn primary" id="s-save">表紙に反映する</button></div>
    <section>
      <h3>バックアップ</h3>
      <p class="note">推しのデータ(写真・画像のURL・テーマ曲のURLふくむ)を文字にして書き出します。コピーしてメモ帳などに保存してください。選んだ音楽ファイルそのものはふくまれません。</p>
      <div class="btns"><button type="button" class="sbtn" id="b-export">書き出す</button><button type="button" class="sbtn" id="b-copy">コピー</button></div>
      <textarea id="b-text" rows="4" placeholder="ここにバックアップの文字を貼りつけて「読みこむ」を押す"></textarea>
      <div class="btns">
        <button type="button" class="sbtn" id="b-import">貼りつけた内容を読みこむ</button>
        <label class="file-btn">ファイルから読みこむ<input type="file" id="b-file" accept=".json,.txt,application/json,text/plain"></label>
      </div>
      <p class="status" id="b-msg" role="status"></p>
    </section>
    <section>
      <h3>見本データ</h3>
      <p class="note">最初から入っている見本の推しをまとめて消して、自分の推しの登録を始めます。一度でも編集して保存した推しは消えません。</p>
      <div class="btns"><button type="button" class="sbtn danger" id="s-clear-samples">見本をまとめて消して作りはじめる</button></div>
    </section>
    <section>
      <h3>保存について</h3>
      <p class="note">データはこのブラウザのローカルストレージに保存されます(ファイルで選んだテーマ曲だけは容量が大きいので、ブラウザ内の別の場所に保存します)。保存できる量には限りがあるので、写真が多いときは画像のURLも使ってください。別のスマホやパソコンで見るときは、バックアップを書き出して読みこんでください。</p>
    </section>
  </div>
</dialog>

<div class="toast" id="toast" role="status"></div>

<script>
(() => {
'use strict';
const $ = s => document.querySelector(s);
const esc = s => String(s ?? '').replace(/[&<>"']/g, c => ({'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#39;'}[c]));
const pad = n => String(n).padStart(2,'0');
const sleep = ms => new Promise(r => setTimeout(r, ms));
const reduced = matchMedia('(prefers-reduced-motion: reduce)').matches;

/* ---------- storage (IndexedDB) ---------- */
const DB = {
  db: null,
  open() {
    if (this.db) return Promise.resolve(this.db);
    return new Promise((res, rej) => {
      try {
        const r = indexedDB.open('oshi-zukan', 1);
        r.onupgradeneeded = () => { const d = r.result; d.createObjectStore('kv'); d.createObjectStore('songs'); };
        r.onsuccess = () => { this.db = r.result; res(this.db); };
        r.onerror = () => rej(r.error);
      } catch (e) { rej(e); }
    });
  },
  async get(store, key) {
    try { const d = await this.open();
      return await new Promise((res, rej) => { const q = d.transaction(store).objectStore(store).get(key); q.onsuccess = () => res(q.result); q.onerror = () => rej(q.error); });
    } catch (e) { return undefined; }
  },
  async set(store, key, val) {
    try { const d = await this.open();
      await new Promise((res, rej) => { const tx = d.transaction(store, 'readwrite'); tx.objectStore(store).put(val, key); tx.oncomplete = res; tx.onerror = () => rej(tx.error); });
      return true;
    } catch (e) { return false; }
  },
  async del(store, key) {
    try { const d = await this.open();
      await new Promise((res, rej) => { const tx = d.transaction(store, 'readwrite'); tx.objectStore(store).delete(key); tx.oncomplete = res; tx.onerror = () => rej(tx.error); });
    } catch (e) {}
  }
};

const SAMPLES = [
  { id:'s1', sample:true, name:'宵月 ミオ', kana:'よいづき みお', group:'アイドルユニット「ルミナリエ」', catch:'夜空いちばんの歌声', color:'#7c8cff', bm:11, bd:3, since:'2023-04-16',
    tags:['笑うと目がなくなる','歌い出しの一声','MCがゆるい'], points:'はじめて配信を見た日、最後に「また明日も会おうね」と言ってくれたのがずっと残っている。\n高音のロングトーンが本当にきれい。', photo:'', songName:'' },
  { id:'s2', sample:true, name:'春風 ソラ', kana:'はるかぜ そら', group:'漫画『星屑テラス』', catch:'ふざけて、守って、笑う人', color:'#ff8fb1', bm:3, bd:21, since:'2021-08-02',
    tags:['不器用なやさしさ','料理が下手','決め台詞'], points:'第4巻で仲間をかばうシーンから沼。\n普段はふざけているのに、大事なときだけ真剣な顔になるのがずるい。', photo:'', songName:'' },
  { id:'s3', sample:true, name:'灯森 レン', kana:'ひもり れん', group:'バンド「夜光虫ラジオ」ギター', catch:'六弦で泣かせる', color:'#2fbf96', bm:7, bd:8, since:'2024-12-24',
    tags:['ギターソロ','低い声','ライブ後のブログ'], points:'ライブハウスの最前で聴いたソロが忘れられない。\nブログの文章がいつも丁寧で、読むと一日がんばれる。', photo:'', songName:'' },
];

let state = { title:'わたしの推し図鑑', owner:'', oshis: SAMPLES.map(o => ({...o})) };
/* 推しのデータは localStorage に保存(ファイルで選んだテーマ曲だけは大きいため IndexedDB) */
const LS_KEY = 'oshi-zukan:v1';
function lsLoad() { try { const s = localStorage.getItem(LS_KEY); return s ? JSON.parse(s) : null; } catch (e) { return null; } }
async function save() {
  try { localStorage.setItem(LS_KEY, JSON.stringify(state)); return true; }
  catch (e) {
    const full = e && (e.name === 'QuotaExceededError' || e.name === 'NS_ERROR_DOM_QUOTA_REACHED' || e.code === 22);
    toast(full ? '保存容量がいっぱいです。写真を減らすか、写真をURLにしてください' : 'この環境では保存できません。バックアップを使ってください');
    return false;
  }
}

/* ---------- helpers ---------- */
function today() { const t = new Date(); t.setHours(0,0,0,0); return t; }
function oshiDays(since) { if (!since) return null; const s = new Date(since + 'T00:00:00'); if (isNaN(s)) return null; const n = Math.floor((today() - s) / 864e5) + 1; return n > 0 ? n : null; }
function untilBirthday(m, d) { if (!m || !d) return null; const t = today(); let b = new Date(t.getFullYear(), m-1, d); if (b < t) b = new Date(t.getFullYear()+1, m-1, d); return Math.round((b - t) / 864e5); }
function fmtDate(s) { if (!s) return ''; const [y,m,d] = s.split('-'); return `${y}.${+m}.${+d}`; }
function urlName(u) { try { const p = new URL(u); const last = decodeURIComponent(p.pathname.split('/').filter(Boolean).pop() || ''); return last.replace(/\.[^.]+$/, '') || p.hostname; } catch (e) { return u; } }
function nm(o) { return (o && o.name) || '名前未設定'; }
function initial(name) { return (String(name || '?').replace(/\s/g,'')[0]) || '?'; }
function toast(msg) { const t = $('#toast'); t.textContent = msg; t.classList.add('show'); clearTimeout(toast.t); toast.t = setTimeout(() => t.classList.remove('show'), 2600); }
function star4(x, y, r) { x = +x; y = +y; const q = r * .28; const f = n => +n.toFixed(2); [x, y] = [f(x), f(y)]; return `M${x} ${y-r}L${x+q} ${y-q}L${x+r} ${y}L${x+q} ${y+q}L${x} ${y+r}L${x-q} ${y+q}L${x-r} ${y}L${x-q} ${y-q}Z`; }
const EMBLEM = (() => { let s = ''; for (let k = 0; k < 12; k++) { const a = k/12*Math.PI*2 - Math.PI/2; s += `<path d="${star4((50+38*Math.cos(a)).toFixed(2), (50+38*Math.sin(a)).toFixed(2), k%3 ? 2.2 : 3.8)}"/>`; }
  return `<svg viewBox="0 0 100 100" aria-hidden="true"><circle cx="50" cy="50" r="47" fill="none" stroke="currentColor" stroke-width=".8"/><circle cx="50" cy="50" r="29" fill="none" stroke="currentColor" stroke-width=".5"/><g fill="currentColor">${s}</g><text x="50" y="59" text-anchor="middle" font-size="26" fill="currentColor" style="font-family:'Kaisei Decol',serif;font-weight:700">推</text></svg>`; })();

/* ---------- faces ---------- */
function buildFaces() {
  const f = [{t:'cover'}];
  state.oshis.forEach((o, i) => f.push({t:'photo', i}, {t:'profile', i}));
  f.push({t:'index'}, {t:'add'}, {t:'back'});
  return f;
}
function phBox(name, msg) { return `<div class="ph"><span>${esc(initial(name))}</span>${msg ? `<small>${esc(msg)}</small>` : ''}</div>`; }
function photoBox(o, hint) {
  const src = o.photo || o.photoUrl;
  return src ? `<img src="${esc(src)}" alt="${esc(nm(o))}の写真" referrerpolicy="no-referrer" data-name="${esc(o.name || '')}">`
             : phBox(o.name, hint ? '写真は「編集」から入れられます' : '');
}
document.addEventListener('error', e => {
  const t = e.target;
  if (t && t.tagName === 'IMG' && t.dataset.name !== undefined) t.outerHTML = phBox(t.dataset.name, '画像を読みこめませんでした');
}, true);
function faceHTML(face, side, idx) {
  const cls = `face ${side}`;
  const folio = `<span class="folio">${idx}</span>`;
  if (face.t === 'cover') {
    return `<div class="${cls} cover"><div class="cover-frame"><div class="cover-emblem">${EMBLEM}</div>
      <p class="cover-kicker">OSHI ZUKAN</p><h1 class="cover-title">${esc(state.title || '推し図鑑')}</h1>
      <p class="cover-count">${state.oshis.length}人の推しを収録</p><p class="cover-owner">${state.owner ? esc(state.owner) + ' の本' : ''}</p></div>
      <p class="cover-hint">タップしてひらく</p></div>`;
  }
  if (face.t === 'back') {
    return `<div class="${cls} cover"><div class="cover-frame"><div class="cover-emblem" style="width:22cqw">${EMBLEM}</div>
      <p class="bc-msg">また会いにきてね</p><p class="cover-kicker" style="letter-spacing:.2em">${esc(state.title)}</p>
      <button class="cover-btn" data-action="tofront">表紙にもどる</button></div></div>`;
  }
  if (face.t === 'blank') return `<div class="${cls} blank"></div>`;
  if (face.t === 'photo') {
    const o = state.oshis[face.i]; const tilt = [-3, 2.5, -1.5, 3.5][face.i % 4];
    return `<div class="${cls} paper photo-page" style="--mc:${o.color};--tilt:${tilt}deg">
      ${o.sample ? '<span class="stamp">見本</span>' : ''}
      <span class="doodle" style="top:9cqw;right:10cqw">✦</span><span class="doodle" style="top:17cqw;right:19cqw;font-size:3.6cqw">✦</span>
      <span class="doodle" style="bottom:22cqw;left:9cqw;font-size:5cqw">♡</span><span class="doodle" style="bottom:28cqw;right:9cqw;font-size:3.4cqw">✧</span>
      <figure class="polaroid"><span class="tape"></span><div class="pic">${photoBox(o, true)}</div><figcaption>${esc(nm(o))}</figcaption></figure>
      ${o.catch ? `<p class="catch">「${esc(o.catch)}」</p>` : ''}${folio}</div>`;
  }
  if (face.t === 'profile') {
    const o = state.oshis[face.i]; const days = oshiDays(o.since); const until = untilBirthday(o.bm, o.bd);
    const bdayNum = until === null ? '—' : until === 0 ? '今日' : until;
    return `<div class="${cls} paper profile" style="--mc:${o.color}"><div class="in">
      <div class="pf-head"><span class="pf-no">No.${pad(face.i+1)}</span>${o.sample ? '<span class="stamp">見本</span>' : ''}<button class="pf-edit" data-edit="${face.i}">編集</button></div>
      <h2 class="pf-name">${esc(nm(o))}</h2>
      ${o.kana ? `<p class="pf-kana">${esc(o.kana)}</p>` : ''}
      ${o.group ? `<p class="pf-group">${esc(o.group)}</p>` : ''}
      <div class="pf-ribbon" data-hex="${esc(o.color.toUpperCase())}"></div>
      <div class="pf-stats">
        <div class="stat"><span class="lbl">推し歴</span><span class="val"><span class="num">${days ?? '—'}</span>${days ? '<span class="unit">日</span>' : ''}</span><span class="sub">${o.since ? fmtDate(o.since) + ' から' : '推し始めた日:未設定'}</span></div>
        <div class="stat"><span class="lbl">誕生日まで</span><span class="val">${until ? '<span class="unit">あと</span>' : ''}<span class="num">${bdayNum}</span>${until ? '<span class="unit">日</span>' : ''}</span><span class="sub">${o.bm && o.bd ? `${o.bm}月${o.bd}日${until === 0 ? ' おめでとう!' : ''}` : '誕生日:未設定'}</span></div>
      </div>
      ${o.tags && o.tags.length ? `<ul class="chips">${o.tags.map(t => `<li>${esc(t)}</li>`).join('')}</ul>` : ''}
      <div class="memo"><span class="lbl">推しポイント</span><p>${esc(o.points || '')}</p></div>
      <div class="pf-song"><button class="song-btn" data-song="${face.i}" aria-label="この推しの曲をながす">♪</button><span>${o.songName ? esc(o.songName) : o.songUrl ? esc(urlName(o.songUrl)) : 'オルゴール(この推しのために自動作曲)'}</span></div>
      </div>${folio}</div>`;
  }
  if (face.t === 'index') {
    const total = state.oshis.reduce((s, o) => s + (oshiDays(o.since) || 0), 0);
    return `<div class="${cls} paper index-page"><div class="in"><h2 class="ix-title">もくじ</h2>
      ${state.oshis.length ? `<ol class="ix-list">${state.oshis.map((o, i) => `<li><button data-jump="${i}"><span class="ix-no">No.${pad(i+1)}</span><span class="dot" style="--mc:${o.color}"></span><span class="ix-name">${esc(nm(o))}</span>${o.group ? `<span class="ix-group">${esc(o.group)}</span>` : ''}</button></li>`).join('')}</ol>`
        : '<p class="ix-empty">まだ推しがいません。<br>となりのページから追加できます。</p><div style="flex:1"></div>'}
      <p class="ix-foot">${state.oshis.length}人収録${total ? `・推し歴の合計 ${total.toLocaleString()}日` : ''}</p></div>${folio}</div>`;
  }
  if (face.t === 'add') {
    return `<div class="${cls} paper add-page"><div class="in"><button class="add-card" data-action="add"><span class="plus">+</span><b>新しい推しを追加</b><small>写真・誕生日・推しポイントを書きこめます</small></button>
      <button class="ghost" data-action="settings">本の設定・バックアップ</button>${state.oshis.some(x => x.sample) ? '<button class="ghost" data-action="clearsamples">見本をまとめて消す</button>' : ''}</div>${folio}</div>`;
  }
  return '';
}

/* ---------- book ---------- */
const book = $('#book'), stage = $('#stage'), wrap = $('#wrap');
let mode = 'double', faces = [], leaves = [], leafEls = [], L = 0, pos = 0, turnSeq = 0;

function computeLayout() {
  const w = stage.clientWidth, h = stage.clientHeight;
  const dPage = Math.min(w * .96, h * .9 * 1.44, 1240) / 2;
  const sPage = Math.min(w * .9, h * .9 * .72, 560);
  const m = (dPage >= 250 && dPage >= sPage * .78) ? 'double' : 'single';
  const pw = m === 'double' ? dPage : sPage;
  return { m, pw: Math.floor(pw) };
}
function sizeBook(pw) {
  book.style.width = (mode === 'double' ? pw * 2 : pw) + 'px';
  book.style.height = Math.floor(pw / .72) + 'px';
}
function maxPos() { return mode === 'double' ? L : L - 1; }
function faceIdxOfPos(p) { return mode === 'double' ? (p === 0 ? 0 : 2*p - 1) : p; }
function posOfFaceIdx(f) { return mode === 'double' ? (f === 0 ? 0 : Math.ceil(f/2)) : f; }

function render(keepFace = 0) {
  const lay = computeLayout(); mode = lay.m; faces = buildFaces();
  leaves = [];
  if (mode === 'double') for (let j = 0; j < faces.length; j += 2) leaves.push([[faces[j], j], [faces[j+1], j+1]]);
  else faces.forEach((f, j) => leaves.push([[f, j], [{t:'blank'}, j]]));
  L = leaves.length;
  book.className = 'book no-anim ' + mode;
  sizeBook(lay.pw);
  book.innerHTML = `<div class="stack stack-l" style="left:0;width:50%"></div><div class="stack stack-r" style="${mode === 'double' ? 'left:50%;width:50%' : 'left:0;width:100%'}"></div>` +
    leaves.map((lf, j) => `<div class="leaf" data-j="${j}">${faceHTML(lf[0][0], 'front', lf[0][1])}${faceHTML(lf[1][0], 'back', lf[1][1])}</div>`).join('');
  leafEls = [...book.querySelectorAll('.leaf')];
  pos = Math.max(0, Math.min(maxPos(), posOfFaceIdx(keepFace)));
  leafEls.forEach((el, j) => settle(el, j));
  updateUI();
  void book.offsetWidth;
  requestAnimationFrame(() => book.classList.remove('no-anim'));
}
function settle(el, j, lifted) {
  const flipped = j < pos;
  const z = lifted ? (L + 4) * .6 : (flipped ? j + 1 : L - j) * .6;
  el.style.transform = `translateZ(${z}px) rotateY(${flipped ? -180 : 0}deg)`;
  el.style.zIndex = lifted ? 1000 + (turnSeq++) : (flipped ? j + 1 : L - j);
  el.style.visibility = (mode === 'single' && flipped && !lifted) ? 'hidden' : '';
}
function step(dir) {
  const np = pos + dir;
  if (np < 0 || np > maxPos()) return false;
  const j = dir > 0 ? pos : pos - 1;
  const el = leafEls[j];
  pos = np;
  el.classList.remove('turning'); void el.offsetWidth; el.classList.add('turning');
  settle(el, j, true);
  clearTimeout(el._t);
  el._t = setTimeout(() => { el.classList.remove('turning'); settle(el, j); }, reduced ? 20 : 920);
  Sound.flip();
  updateUI();
  return true;
}
let flipping = false;
async function flipTo(target) {
  target = Math.max(0, Math.min(maxPos(), target));
  if (flipping) return; flipping = true;
  const dir = Math.sign(target - pos);
  while (pos !== target) { step(dir); await sleep(reduced ? 0 : 170); }
  flipping = false;
}
function oshiAtPos() {
  if (mode === 'double') return (pos >= 1 && pos <= state.oshis.length) ? pos - 1 : -1;
  const f = faces[pos]; return f && (f.t === 'photo' || f.t === 'profile') ? f.i : -1;
}
function spreadOfOshi(i) { return posOfFaceIdx(2*i + 1); }

function updateUI() {
  let shift = 0;
  if (mode === 'double') { if (pos === 0) shift = -25; else if (pos === L) shift = 25; }
  book.style.setProperty('--shift', shift + '%');
  const sl = book.querySelector('.stack-l'), sr = book.querySelector('.stack-r');
  const edge = (n, s) => Array.from({length: Math.min(n, 7)}, (_, k) => `${s*(k+1)*1.2}px ${(k+1)*.8}px 0 ${k%2 ? '#d8cec6' : '#efe7e0'}`).join(',') || 'none';
  if (sl) { sl.style.boxShadow = edge(pos - 1, -1); sl.style.opacity = pos > 0 ? 1 : 0; }
  if (sr) { const remain = mode === 'double' ? L - pos - 1 : L - pos - 2; sr.style.boxShadow = edge(remain, 1); sr.style.opacity = (mode === 'double' ? pos < L : pos < L - 1) ? 1 : 0; }

  const oi = oshiAtPos();
  const o = state.oshis[oi];
  const f = faces[faceIdxOfPos(pos)] || {};
  let label = '';
  if (o) label = `No.${pad(oi+1)} ${nm(o)}`;
  else if (pos === 0) label = '表紙';
  else if (mode === 'double' ? pos === L : f.t === 'back') label = '裏表紙';
  else label = (mode === 'single' && f.t === 'add') ? '推しを追加' : 'もくじ';
  $('#where').textContent = label;
  $('#prev').disabled = pos === 0;
  $('#next').disabled = pos === maxPos();
  $('#edit-btn').disabled = !o;
  const hasSample = state.oshis.some(x => x.sample);
  $('#clear-samples').hidden = !hasSample; $('#hint').hidden = hasSample;
  document.getElementById('app').style.setProperty('--glowc', o ? o.color : '#8a6cff');
  Sound.want(o ? o.id : 'cover', o);
}

/* interaction */
let downX = null, downY = null, swiped = false;
stage.addEventListener('pointerdown', e => { downX = e.clientX; downY = e.clientY; swiped = false; });
stage.addEventListener('pointerup', e => {
  if (downX === null) return;
  const dx = e.clientX - downX, dy = e.clientY - downY; downX = null;
  if (Math.abs(dx) > 40 && Math.abs(dx) > Math.abs(dy) * 1.2) { swiped = true; step(dx < 0 ? 1 : -1); }
});
stage.addEventListener('pointermove', e => {
  if (e.pointerType !== 'mouse' || reduced) return;
  const r = stage.getBoundingClientRect();
  const x = (e.clientX - r.left) / r.width - .5, y = (e.clientY - r.top) / r.height - .5;
  wrap.style.setProperty('--rx', (10 - y * 8).toFixed(2) + 'deg');
  wrap.style.setProperty('--ry', (x * 10).toFixed(2) + 'deg');
});
stage.addEventListener('pointerleave', () => { wrap.style.setProperty('--rx', '10deg'); wrap.style.setProperty('--ry', '0deg'); });
book.addEventListener('click', e => {
  const t = e.target.closest('[data-edit],[data-jump],[data-action],[data-song]');
  if (t) {
    if (t.dataset.edit !== undefined) openEditor(+t.dataset.edit);
    else if (t.dataset.jump !== undefined) flipTo(spreadOfOshi(+t.dataset.jump));
    else if (t.dataset.song !== undefined) { if (!Sound.on) Sound.toggle(true); else Sound.restart(); }
    else if (t.dataset.action === 'add') openEditor(-1);
    else if (t.dataset.action === 'settings') openSettings();
    else if (t.dataset.action === 'tofront') flipTo(0);
    else if (t.dataset.action === 'clearsamples') clearSamples();
    return;
  }
  if (swiped) { swiped = false; return; }
  if (e.target.closest('button,a,input,textarea,select')) return;
  const leaf = e.target.closest('.leaf'); if (!leaf) return;
  if (+leaf.dataset.j < pos) step(-1); else step(1);
});
$('#prev').onclick = () => step(-1);
$('#next').onclick = () => step(1);
document.addEventListener('keydown', e => {
  if (document.querySelector('dialog[open]') || /INPUT|TEXTAREA|SELECT/.test(document.activeElement?.tagName)) return;
  if (e.key === 'ArrowRight') step(1); else if (e.key === 'ArrowLeft') step(-1);
});
let rzT;
new ResizeObserver(() => { clearTimeout(rzT); rzT = setTimeout(() => {
  const lay = computeLayout();
  if (lay.m !== mode) render(faceIdxOfPos(pos)); else { sizeBook(lay.pw); }
}, 80); }).observe(stage);

/* ---------- sound ---------- */
function hashStr(s) { let h = 2166136261; for (const c of s) { h ^= c.codePointAt(0); h = Math.imul(h, 16777619); } return h >>> 0; }
function rng(a) { return () => { a |= 0; a = a + 0x6D2B79F5 | 0; let t = Math.imul(a ^ a >>> 15, 1 | a); t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t; return ((t ^ t >>> 14) >>> 0) / 4294967296; }; }
function makeSong(seed) {
  const r = rng(hashStr(seed)); const pick = a => a[Math.floor(r() * a.length)];
  const root = 58 + Math.floor(r() * 8), bpm = 82 + Math.floor(r() * 24);
  const S = [0,2,4,5,7,9,11];
  const dm = (d, base) => base + S[((d % 7) + 7) % 7] + 12 * Math.floor(d / 7);
  const prog = pick([[0,4,5,3],[0,5,3,4],[0,3,4,4],[5,3,0,4],[0,2,3,4],[3,4,2,5],[0,4,3,4]]);
  const rhythms = [[2,2,2,2],[1,1,2,2,2],[3,1,2,2],[2,1,1,2,2],[4,2,2],[2,2,4],[1,1,1,1,2,2],[3,1,4],[2,2,1,1,2]];
  let md = 7 + pick([0,2,4]);
  const bar = (c, last) => {
    const rh = last ? [2,2,4] : pick(rhythms); let t = 0; const out = [];
    rh.forEach((d, k) => {
      const strong = t % 4 === 0;
      if (last && k === rh.length - 1) md = 7;
      else {
        md += pick([-2,-1,-1,1,1,2,0,3,-3]);
        if (md < 5) md += 3; if (md > 13) md -= 3;
        if (strong) { const tones = [c, c+2, c+4].flatMap(x => [x, x+7, x-7]); md = tones.reduce((a, b) => Math.abs(b - md) < Math.abs(a - md) ? b : a); }
      }
      out.push({ t, m: dm(md, root), d, v: strong ? .9 : .65 }); t += d;
    });
    return out;
  };
  const A = prog.map(c => bar(c));
  const bars = [...A, A[0], A[1], bar(prog[2]), bar(prog[3], true)];
  const byStep = Array.from({length: 64}, () => []);
  bars.forEach((notes, b) => {
    notes.forEach(n => byStep[b*8 + n.t].push({ m: n.m, d: n.d, v: n.v }));
    const c = prog[b % 4];
    [[0, c], [2, c+4], [4, c+2+7], [6, c+4]].forEach(([t, d]) => byStep[b*8 + t].push({ m: dm(d, root - 12), d: 2, v: .32 }));
  });
  return { bpm, len: 64, byStep };
}
const Sound = {
  ctx: null, on: false, master: null, out: null, el: null, key: null, wantKey: 'cover', wantOshi: null,
  song: null, timer: null, next: 0, stepN: 0, urls: new Map(),
  init() {
    if (this.ctx) return true;
    const C = window.AudioContext || window.webkitAudioContext; if (!C) return false;
    const ctx = this.ctx = new C();
    this.out = ctx.createGain(); this.out.gain.value = .9; this.out.connect(ctx.destination);
    this.master = ctx.createGain(); this.master.gain.value = 0;
    const len = ctx.sampleRate * 2.2, ir = ctx.createBuffer(2, len, ctx.sampleRate);
    for (let ch = 0; ch < 2; ch++) { const d = ir.getChannelData(ch); for (let i = 0; i < len; i++) d[i] = (Math.random()*2 - 1) * Math.pow(1 - i/len, 3); }
    const verb = ctx.createConvolver(); verb.buffer = ir; const wet = ctx.createGain(); wet.gain.value = .32;
    this.master.connect(this.out); this.master.connect(verb); verb.connect(wet); wet.connect(this.out);
    this.el = document.createElement('audio'); this.el.loop = true; this.el.preload = 'auto';
    this.el.addEventListener('error', () => { if (this.el.dataset.k === this.key) this.fail(this.key, this.wantOshi); });
    document.addEventListener('visibilitychange', () => { if (!this.on) return; if (document.hidden) { this.ctx.suspend(); this.el.pause(); } else { this.ctx.resume(); if (this.el.src && this.key && this.el.dataset.k === this.key) this.el.play().catch(() => {}); } });
    return true;
  },
  async toggle(force) {
    this.on = force ?? !this.on;
    if (this.on) {
      if (!this.init()) { this.on = false; toast('このブラウザでは音が出せません'); }
      else { try { await this.ctx.resume(); } catch (e) {} this.key = null; this.apply(); }
    } else this.stopAll();
    $('#music-btn').setAttribute('aria-pressed', String(this.on));
  },
  want(key, oshi) { this.wantKey = key; this.wantOshi = oshi || null; if (this.on) this.apply(); },
  restart() { this.key = null; this.apply(); },
  forget(id) { const u = this.urls.get(id); if (u) { URL.revokeObjectURL(u); this.urls.delete(id); } if (this.key === id) this.key = null; },
  async apply() {
    const key = this.wantKey, o = this.wantOshi;
    if (this.key === key) return;
    this.key = key;
    let url = null;
    if (o && o.songName) {
      url = this.urls.get(o.id);
      if (!url) { const blob = await DB.get('songs', o.id); if (blob) { url = URL.createObjectURL(blob); this.urls.set(o.id, url); } }
      if (this.key !== key || !this.on) return;
    }
    if (!url && o && o.songUrl) url = o.songUrl;
    if (url) {
      this.stopBox();
      this.el.src = url; this.el.dataset.k = key; this.el.dataset.failed = ''; this.el.volume = 0;
      this.el.play().then(() => this.fadeEl(.85)).catch(() => this.fail(key, o));
    } else {
      this.el.pause();
      this.startBox(makeSong(o ? (o.id + o.name) : 'oshi-zukan-cover'));
    }
  },
  fail(key, o) {
    if (this.key !== key || !this.on || this.el.dataset.failed) return;
    this.el.dataset.failed = '1'; this.el.pause();
    toast('テーマ曲を再生できませんでした。オルゴールに切りかえます');
    this.startBox(makeSong(o ? (o.id + o.name) : 'oshi-zukan-cover'));
  },
  fadeEl(to) { const el = this.el; let v = el.volume; clearInterval(this._f); this._f = setInterval(() => { v += (to - v) * .2; if (Math.abs(to - v) < .01) { v = to; clearInterval(this._f); } el.volume = Math.max(0, Math.min(1, v)); }, 40); },
  startBox(song) {
    const ctx = this.ctx, g = this.master.gain, t = ctx.currentTime;
    g.cancelScheduledValues(t); g.setValueAtTime(g.value, t); g.linearRampToValueAtTime(0, t + .25);
    setTimeout(() => {
      if (!this.on) return;
      this.song = song; this.stepN = 0; this.next = ctx.currentTime + .05;
      const t2 = ctx.currentTime; g.cancelScheduledValues(t2); g.setValueAtTime(0, t2); g.linearRampToValueAtTime(.55, t2 + .4);
      if (!this.timer) this.timer = setInterval(() => this.tick(), 25);
    }, 260);
  },
  stopBox() {
    clearInterval(this.timer); this.timer = null; this.song = null;
    if (this.ctx) { const g = this.master.gain, t = this.ctx.currentTime; g.cancelScheduledValues(t); g.setValueAtTime(g.value, t); g.linearRampToValueAtTime(0, t + .3); }
  },
  stopAll() { this.stopBox(); if (this.el) { this.el.pause(); } this.key = null; },
  tick() {
    const s = this.song, ctx = this.ctx; if (!s) return;
    const spb = 60 / s.bpm / 2;
    if (this.next < ctx.currentTime - .2) this.next = ctx.currentTime + .05;
    while (this.next < ctx.currentTime + .12) {
      for (const n of s.byStep[this.stepN % s.len]) this.note(n.m, this.next, n.d * spb, n.v);
      this.next += spb; this.stepN++;
    }
  },
  note(m, t, dur, v) {
    const ctx = this.ctx, f = 440 * Math.pow(2, (m - 69) / 12), end = t + Math.max(.9, dur * 2.4);
    const g = ctx.createGain(); g.gain.setValueAtTime(0, t); g.gain.linearRampToValueAtTime(v * .22, t + .004); g.gain.exponentialRampToValueAtTime(.0001, end);
    g.connect(this.master);
    [[1, 1], [4.02, .10], [2, .06]].forEach(([mul, amp], k) => {
      const o = ctx.createOscillator(); o.type = 'sine'; o.frequency.value = f * mul;
      const og = ctx.createGain(); og.gain.value = amp;
      if (k) { og.gain.setValueAtTime(amp, t); og.gain.exponentialRampToValueAtTime(.0001, t + .25); }
      o.connect(og); og.connect(g); o.start(t); o.stop(end + .05);
    });
  },
  flip() {
    if (!this.on || !this.ctx) return;
    const ctx = this.ctx, t = ctx.currentTime, len = ctx.sampleRate * .4;
    const b = ctx.createBuffer(1, len, ctx.sampleRate), d = b.getChannelData(0);
    for (let i = 0; i < len; i++) d[i] = (Math.random()*2 - 1) * Math.sin(Math.PI * i / len) ** 2;
    const src = ctx.createBufferSource(); src.buffer = b;
    const bp = ctx.createBiquadFilter(); bp.type = 'bandpass'; bp.frequency.setValueAtTime(1800, t); bp.frequency.linearRampToValueAtTime(3600, t + .35); bp.Q.value = .7;
    const g = ctx.createGain(); g.gain.value = .22;
    src.connect(bp); bp.connect(g); g.connect(this.out); src.start(t);
  }
};
$('#music-btn').onclick = () => Sound.toggle();

/* ---------- editor ---------- */
const COLORS = ['#ff5a7a','#ff8fb1','#ff9f43','#f6c945','#7ad151','#2fbf96','#35b9e6','#7c8cff','#a46bff','#e8e8ef','#3b3b48'];
const ed = $('#editor');
let editing = -1, draftPhoto, draftSong, draftSongName;
(function setupForm() {
  const bm = $('#f-bm'), bd = $('#f-bd');
  bm.innerHTML = '<option value="">--</option>' + Array.from({length:12}, (_, i) => `<option value="${i+1}">${i+1}</option>`).join('');
  bd.innerHTML = '<option value="">--</option>' + Array.from({length:31}, (_, i) => `<option value="${i+1}">${i+1}</option>`).join('');
  const sw = $('#swatches');
  COLORS.forEach(c => { const b = document.createElement('button'); b.type = 'button'; b.className = 'sw'; b.style.background = c; b.setAttribute('aria-label', c); b.onclick = () => { $('#f-color').value = c; refreshPreview(); }; sw.insertBefore(b, $('#f-color')); });
  $('#f-color').addEventListener('input', refreshPreview);
  $('#f-name').addEventListener('input', refreshPreview);
  $('#f-photourl').addEventListener('input', refreshPreview);
})();
function refreshPreview() {
  const pv = $('#photo-preview');
  pv.style.setProperty('--mc', $('#f-color').value);
  const pu = $('#f-photourl').value.trim();
  pv.innerHTML = photoBox({ photo: draftPhoto, photoUrl: /^https?:\/\/\S+$/i.test(pu) ? pu : '', name: $('#f-name').value || '?' }, false);
}
function setSongLabel() {
  $('#song-name').textContent = draftSongName ? `♪ ${draftSongName}` : '未設定:この推しだけのオルゴール曲を自動で作ります';
}
function openEditor(i) {
  editing = i;
  const o = i >= 0 ? state.oshis[i] : { name:'', kana:'', group:'', catch:'', color: COLORS[(state.oshis.length * 3) % COLORS.length], bm:'', bd:'', since:'', tags:[], points:'', photo:'', photoUrl:'', songName:'', songUrl:'' };
  $('#edit-title').textContent = i >= 0 ? `No.${pad(i+1)} を編集` : '推しを追加';
  $('#sample-note').hidden = !(o.sample);
  $('#f-name').value = o.name; $('#f-kana').value = o.kana || ''; $('#f-group').value = o.group || ''; $('#f-catch').value = o.catch || '';
  $('#f-bm').value = o.bm || ''; $('#f-bd').value = o.bd || ''; $('#f-since').value = o.since || '';
  $('#f-color').value = o.color; $('#f-tags').value = (o.tags || []).join('、'); $('#f-points').value = o.points || '';
  draftPhoto = o.photo || ''; draftSong = undefined; draftSongName = o.songName || '';
  $('#f-photo').value = ''; $('#f-song').value = ''; $('#f-songurl').value = o.songUrl || ''; $('#f-photourl').value = o.photoUrl || '';
  $('#manage').hidden = i < 0;
  $('#move-prev').disabled = i <= 0; $('#move-next').disabled = i < 0 || i >= state.oshis.length - 1;
  $('#del').hidden = false; $('#del-confirm').hidden = true;
  setSongLabel(); refreshPreview();
  ed.showModal();
  if (i < 0) setTimeout(() => $('#f-name').focus(), 50);
}
function readImage(file) {
  return new Promise((res, rej) => {
    const fr = new FileReader();
    fr.onload = () => { const img = new Image(); img.onload = () => {
      const k = Math.min(1, 720 / Math.max(img.width, img.height)); const c = document.createElement('canvas');
      c.width = Math.round(img.width * k); c.height = Math.round(img.height * k);
      c.getContext('2d').drawImage(img, 0, 0, c.width, c.height); res(c.toDataURL('image/jpeg', .8));
    }; img.onerror = rej; img.src = fr.result; };
    fr.onerror = rej; fr.readAsDataURL(file);
  });
}
$('#f-photo').addEventListener('change', async e => { const f = e.target.files[0]; if (!f) return; try { draftPhoto = await readImage(f); refreshPreview(); } catch (err) { toast('この画像は読みこめませんでした'); } });
$('#photo-clear').onclick = () => { draftPhoto = ''; $('#f-photo').value = ''; $('#f-photourl').value = ''; refreshPreview(); };
$('#f-song').addEventListener('change', e => { const f = e.target.files[0]; if (!f) return; draftSong = f; draftSongName = f.name.replace(/\.[^.]+$/, ''); setSongLabel(); });
$('#song-clear').onclick = () => { draftSong = null; draftSongName = ''; $('#f-song').value = ''; setSongLabel(); };
document.querySelectorAll('[data-close]').forEach(b => b.onclick = () => b.closest('dialog').close());

$('#edit-form').addEventListener('submit', async e => {
  e.preventDefault();
  const name = $('#f-name').value.trim();
  const photoUrl = $('#f-photourl').value.trim();
  if (photoUrl && !/^https?:\/\/\S+$/i.test(photoUrl)) { toast('画像のURLは https:// から始まる形で入れてください'); $('#f-photourl').focus(); return; }
  const songUrl = $('#f-songurl').value.trim();
  if (songUrl && !/^https?:\/\/\S+$/i.test(songUrl)) { toast('URLは https:// から始まる形で入れてください'); $('#f-songurl').focus(); return; }
  const isNew = editing < 0;
  const o = isNew ? { id: 'o' + Date.now().toString(36) + Math.floor(Math.random()*1e4) } : { ...state.oshis[editing] };
  Object.assign(o, {
    name, kana: $('#f-kana').value.trim(), group: $('#f-group').value.trim(), catch: $('#f-catch').value.trim(),
    color: $('#f-color').value, bm: +$('#f-bm').value || '', bd: +$('#f-bd').value || '', since: $('#f-since').value,
    tags: $('#f-tags').value.split(/[、,,]/).map(s => s.trim()).filter(Boolean).slice(0, 8),
    points: $('#f-points').value.trim(), photo: draftPhoto || '', photoUrl, songUrl, sample: false
  });
  if (draftSong instanceof Blob) { const ok = await DB.set('songs', o.id, draftSong); if (!ok) toast('テーマ曲を保存できませんでした'); o.songName = ok ? draftSongName : ''; Sound.forget(o.id); }
  else if (draftSong === null) { await DB.del('songs', o.id); o.songName = ''; Sound.forget(o.id); }
  let idx;
  if (isNew) { state.oshis.push(o); idx = state.oshis.length - 1; } else { state.oshis[editing] = o; idx = editing; }
  await save();
  ed.close();
  if (isNew) {
    render(2 * state.oshis.length + 2);
    await sleep(350);
    flipTo(spreadOfOshi(idx));
    toast(`${nm(o)} を追加しました`);
  } else { Sound.key = null; render(faceIdxOfPos(pos)); toast('保存しました'); }
});
function moveOshi(d) {
  const i = editing, j = i + d; if (j < 0 || j >= state.oshis.length) return;
  [state.oshis[i], state.oshis[j]] = [state.oshis[j], state.oshis[i]];
  save(); ed.close(); render(2 * j + 1); toast(`No.${pad(j+1)} に移動しました`);
}
$('#move-prev').onclick = () => moveOshi(-1);
$('#move-next').onclick = () => moveOshi(1);
$('#del').onclick = () => { $('#del').hidden = true; $('#del-confirm').hidden = false; };
$('#del-no').onclick = () => { $('#del').hidden = false; $('#del-confirm').hidden = true; };
$('#del-yes').onclick = async () => {
  const [o] = state.oshis.splice(editing, 1);
  await DB.del('songs', o.id); Sound.forget(o.id); await save(); ed.close();
  render(Math.max(0, 2 * Math.min(editing, state.oshis.length - 1) + 1) || (state.oshis.length ? 1 : 1));
  toast(`${nm(o)} を削除しました`);
};
$('#add-btn').onclick = () => openEditor(-1);
$('#edit-btn').onclick = () => { const i = oshiAtPos(); if (i >= 0) openEditor(i); };

/* ---------- settings / backup ---------- */
const st = $('#settings');
let importArmed = false;
function clearSamples() {
  const n = state.oshis.filter(o => o.sample).length;
  if (!n) return;
  state.oshis = state.oshis.filter(o => !o.sample);
  save();
  if (st.open) st.close();
  render(0);
  toast(`見本${n}人を消しました。自分の推しを追加しましょう`);
  setTimeout(() => openEditor(-1), 450);
}
function openSettings() { $('#s-clear-samples').disabled = !state.oshis.some(o => o.sample); $('#s-title').value = state.title; $('#s-owner').value = state.owner; $('#b-msg').textContent = ''; importArmed = false; $('#b-import').textContent = '貼りつけた内容を読みこむ'; st.showModal(); }
$('#settings-btn').onclick = openSettings;
$('#s-clear-samples').onclick = clearSamples;
$('#clear-samples').onclick = clearSamples;
$('#s-save').onclick = async () => { state.title = $('#s-title').value.trim() || 'わたしの推し図鑑'; state.owner = $('#s-owner').value.trim(); await save(); render(faceIdxOfPos(pos)); $('#b-msg').textContent = '表紙を書きかえました'; };
$('#b-export').onclick = () => {
  $('#b-text').value = JSON.stringify({ app: 'oshi-zukan', v: 1, title: state.title, owner: state.owner, oshis: state.oshis.map(o => ({ ...o, songName: '' })) });
  $('#b-msg').textContent = `${state.oshis.length}人分を書き出しました。「コピー」で保存してください`;
};
$('#b-copy').onclick = async () => {
  const ta = $('#b-text'); if (!ta.value) $('#b-export').onclick();
  try { await navigator.clipboard.writeText(ta.value); $('#b-msg').textContent = 'コピーしました'; }
  catch (e) { ta.focus(); ta.select(); $('#b-msg').textContent = '選択しました。長押しまたは ⌘C / Ctrl+C でコピーしてください'; }
};
async function doImport(text) {
  let data; try { data = JSON.parse(text); } catch (e) { $('#b-msg').textContent = '読みこめませんでした。書き出した文字をそのまま貼りつけてください'; return; }
  if (!data || !Array.isArray(data.oshis)) { $('#b-msg').textContent = '推し図鑑のバックアップではないようです'; return; }
  state = { title: String(data.title || 'わたしの推し図鑑'), owner: String(data.owner || ''),
    oshis: data.oshis.filter(o => o && typeof o === 'object').map((o, k) => ({ id: String(o.id || 'o' + k + Date.now()), name: String(o.name || ''), kana: String(o.kana || ''), group: String(o.group || ''), catch: String(o.catch || ''),
      color: /^#[0-9a-f]{6}$/i.test(o.color) ? o.color : '#ff8fb1', bm: +o.bm || '', bd: +o.bd || '', since: /^\d{4}-\d{2}-\d{2}$/.test(o.since) ? o.since : '',
      tags: Array.isArray(o.tags) ? o.tags.map(String).slice(0, 8) : [], points: String(o.points || ''), photo: /^data:image\//.test(o.photo) ? o.photo : '', photoUrl: /^https?:\/\/\S+$/i.test(o.photoUrl || '') ? String(o.photoUrl) : '', songName: '', songUrl: /^https?:\/\/\S+$/i.test(o.songUrl || '') ? String(o.songUrl) : '', sample: !!o.sample })) };
  await save(); render(0); $('#b-msg').textContent = `${state.oshis.length}人の推しを読みこみました`;
}
$('#b-import').onclick = () => {
  const txt = $('#b-text').value.trim(); if (!txt) { $('#b-msg').textContent = '先にバックアップの文字を貼りつけてください'; return; }
  if (!importArmed) { importArmed = true; $('#b-import').textContent = 'もう一度押すと、今の内容と入れかわります'; return; }
  importArmed = false; $('#b-import').textContent = '貼りつけた内容を読みこむ'; doImport(txt);
};
$('#b-file').addEventListener('change', e => { const f = e.target.files[0]; if (!f) return; const fr = new FileReader(); fr.onload = () => { $('#b-text').value = fr.result; importArmed = true; $('#b-import').textContent = 'もう一度押すと、今の内容と入れかわります'; $('#b-msg').textContent = 'ファイルを読みました。下のボタンで確定します'; }; fr.readAsText(f); e.target.value = ''; });

/* ---------- boot ---------- */
const saved = lsLoad();
if (saved && Array.isArray(saved.oshis)) state = saved;
render(0);
if (!saved) {
  /* 前の版(IndexedDB保存)のデータがあれば localStorage に引っこす */
  DB.get('kv', 'state').then(old => {
    if (old && Array.isArray(old.oshis)) { state = old; render(0); save().then(ok => { if (ok) DB.del('kv', 'state'); }); }
    else save();
  });
}
})();
</script>
</body>
</html>

推しプロフ図鑑を自由につくろう!

好きな推しの、プロフィールが、作れます!! ページをめくると、また新しい推しを追加することができます。 ぜひ、やってみてください。

🤖 使用したAI
Claude
👁 49 回閲覧
📅 投稿:2026年10月24日 🔄 更新:2026年11月15日
応援スタンプを押してみよう!