* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #f5f3ee; color: #1b1b1d; touch-action: manipulation;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic", sans-serif;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; overflow: hidden; }
#app { touch-action: none; position: fixed; inset: 0; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; }

#stage { position: relative; flex: 1; min-height: 0; }
#c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

#hint { position: absolute; inset: 0; pointer-events: none; }
#hint[hidden] { display: none; }
#hint span { position: absolute; left: 50%; width: 0; height: 0; }
#hint i { position: absolute; width: 26px; height: 46px; margin: -12px -13px; border-radius: 13px 13px 9px 9px; border: 2.5px solid #1b1b1d; background: #e9b48f; }
#hint i::after { content: ""; position: absolute; left: 4px; right: 4px; top: 3px; height: 13px; border-radius: 8px 8px 5px 5px; border: 1.5px solid #1b1b1d; background: #f6d9c4; }
#hint .lr { top: 66%; }
#hint .lr i { animation: lr 2.6s ease-in-out infinite; }
#hint .tp { top: 72%; }
#hint .tp i { opacity: 0; animation: tp 2.6s ease-in infinite; }
@keyframes lr { 0% { transform: translateX(-60px); opacity: 1; } 25% { transform: translateX(60px); } 45% { transform: translateX(-60px); opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes tp { 0%, 55% { transform: scale(1.25); opacity: 0; } 60% { opacity: 1; transform: scale(1.25); } 68% { transform: scale(0.9); } 76% { transform: scale(1.1); } 84% { transform: scale(0.9); } 95% { opacity: 1; } 100% { opacity: 0; } }

.panel { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(245,243,238,.86); overflow-y: auto; overscroll-behavior: contain; padding: 16px; z-index: 10; }
.panel[hidden] { display: none; }
#title { background: rgba(245,243,238,.35); align-items: flex-end; padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
#result { background: #f5f3ee; align-items: flex-start; }
.box { width: 100%; max-width: 360px; text-align: center; margin: 0 auto; }
#title .box { background: #f5f3ee; border: 2px solid #1b1b1d; padding: 14px 16px 10px; }
.box.wide { max-width: 520px; margin-top: 0; }
h1 { font-size: 44px; letter-spacing: 3px; margin: 0 0 2px; white-space: nowrap; }
.sub { margin: 0 0 10px; font-size: 16px; font-weight: 700; word-break: auto-phrase; text-wrap: pretty; }
button, .button { font: inherit; font-size: 16px; font-weight: 700; color: #1b1b1d; background: #fff; border: 2px solid #1b1b1d; border-radius: 0;
  padding: 10px 18px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
button.primary, .button.primary { background: #1b1b1d; color: #fff; }
button.big { width: 100%; padding: 14px; font-size: 18px; margin-top: 4px; }
#hero { width: 100%; aspect-ratio: 1 / 1.08; max-height: 60vh; display: block; margin: 0 auto; }
.row { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
#r-post { flex: 1.7; background: #1b1b1d; color: #fff; font-size: 18px; padding: 13px 8px; white-space: nowrap; }
#r-post svg { width: 18px; height: 18px; }
#again { flex: 1; font-size: 15px; padding: 10px 4px; white-space: nowrap; }
#r-after { margin-top: 18px; }
#r-share { gap: 6px; position: sticky; bottom: 0; z-index: 3; margin: 14px -12px 0; padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  background: #f5f3ee; box-shadow: 0 -8px 10px -8px rgba(27,27,29,.28); }
#r-row { margin-top: 8px; }

.rk { margin: 14px 0 6px; padding: 10px 12px; text-align: left; border: 2px solid #1b1b1d; background: #fff; }
.rk h3 { margin: 0 0 6px; font-size: 15px; }
.rk .ghost { width: 100%; margin-top: 6px; font-size: 14px; padding: 8px; }
.rksub { margin: 4px 0; color: #6b6a66; font-size: 13px; }
.rkin { margin: 2px 0 8px; font-size: 15px; font-weight: 700; color: #d23a2c; }
.rkin b { font-size: 22px; }
.rkform { display: flex; gap: 8px; align-items: center; }
.rkform input { flex: 1; min-width: 0; height: 44px; padding: 0 10px; border: 2px solid #1b1b1d; border-radius: 0; font: inherit; font-size: 16px; }
.rkform button { white-space: nowrap; padding: 10px 16px; }
.rkerr { margin: 4px 0 0; color: #d23a2c; font-size: 13px; min-height: 1em; }
.rklist { list-style: none; margin: 6px 0 0; padding: 0; }
.rklist li { display: flex; align-items: baseline; gap: 8px; padding: 6px 2px; border-bottom: 1px solid rgba(27,27,29,.15); font-size: 15px; }
.rklist li:last-child { border-bottom: 0; }
.rklist li.me { background: #fbecc2; font-weight: 700; }
.rklist .no { width: 2em; text-align: right; color: #6b6a66; font-variant-numeric: tabular-nums; }
.rklist .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rklist .tm { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.rkov { position: fixed; inset: 0; z-index: 30; max-width: 560px; margin: 0 auto; background: #f5f3ee; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px 24px; }
.rkhead { position: sticky; top: 0; display: flex; align-items: center; gap: 6px; padding: 10px 0; background: #f5f3ee; }
.rkhead h2 { margin: 0; font-size: 18px; }
.rkhead .back { width: 40px; height: 40px; border: 0; background: none; font-size: 30px; line-height: 1; padding: 0; }
.rtabs { display: flex; gap: 6px; margin: 0 0 6px; }
.rtab { flex: 1; padding: 8px; }
.rtab.on { background: #1b1b1d; color: #fff; }
