* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #efe6d6; 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: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px) 0; background: #4b4f5c; }
#c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

.panel { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; overflow-y: auto; overscroll-behavior: contain; padding: 16px; z-index: 10; }
.panel[hidden] { display: none; }
#title { background: rgba(239,231,214,.25); align-items: flex-end; padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
#result { background: #efe7d6; align-items: flex-start; padding-top: 24px; }
.box { width: 100%; max-width: 360px; text-align: center; margin: 0 auto; }
#title .box { background: #f7f2e8; border: 2px solid #1b1b1d; padding: 14px 16px 12px; }
.box.wide { max-width: 520px; }
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 { background: #1b1b1d; color: #fff; }
button.big { width: 100%; padding: 14px; font-size: 18px; margin-top: 4px; }
#card { width: 100%; aspect-ratio: 1200 / 630; display: block; margin: 0 auto; border: 2px solid #1b1b1d; }
#r-best { margin: 6px 0 0; font-weight: 900; color: #d23a2c; }
#r-best[hidden], #r-rank[hidden] { display: none; }
#r-rank { margin: 6px 0 0; font-size: 22px; font-weight: 900; color: #b3242c; }
#r-line { margin: 6px 0 0; font-weight: 700; word-break: auto-phrase; text-wrap: pretty; }
.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-share { position: sticky; bottom: 0; margin: 14px -12px 0; padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); background: #efe7d6; }
