* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #14243b; 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: #14243b; }
#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 { align-items: flex-end; padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); pointer-events: none; }
#title .box { pointer-events: auto; }
#result { background: #e6ebf1; align-items: flex-start; padding-top: 24px; }
.box { width: 100%; max-width: 360px; text-align: center; margin: 0 auto; }
#title .box { background: #f5f3ee; 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; white-space: nowrap; }
button.primary { background: #1b1b1d; color: #fff; }
button.big { width: 100%; padding: 14px; font-size: 18px; margin-top: 8px; }
.snd { min-height: 40px; padding: 6px 14px; font-size: 14px; }
.snd svg { width: 20px; height: 20px; }
.snd .x { display: none; }
.snd.off .w { display: none; }
.snd.off .x { display: inline; }
#card { width: 100%; aspect-ratio: 1200 / 630; display: block; margin: 0 auto; border: 2px solid #1b1b1d; }
.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; }
#r-post svg { width: 18px; height: 18px; }
#again { flex: 1; font-size: 15px; padding: 10px 4px; }
#r-share { position: sticky; bottom: 0; margin: 14px -12px 0; padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); background: #e6ebf1; }
#r-best { margin: 8px 0 0; font-weight: 900; color: #d23a2c; word-break: auto-phrase; text-wrap: pretty; }
#r-best[hidden], #r-video[hidden], #r-vhint[hidden] { display: none; }
#r-video { width: 100%; margin-top: 10px; padding: 12px 8px; font-size: 16px; gap: 8px; }
#r-video svg { width: 20px; height: 20px; }
#r-video:disabled { color: #8a8478; border-color: #b9b2a4; cursor: default; }
#r-vhint { margin: 6px 0 0; font-size: 13px; color: #45433e; text-align: center; word-break: auto-phrase; text-wrap: pretty; }
:lang(ko) body { font-family: "Apple SD Gothic Neo", "Noto Sans KR", "Noto Sans CJK KR", "Malgun Gothic", sans-serif; }
:lang(zh-Hans) body { font-family: "PingFang SC", "Noto Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif; }
:lang(zh-Hant) body { font-family: "PingFang TC", "Noto Sans TC", "Noto Sans CJK TC", "Microsoft JhengHei", sans-serif; }
:lang(en) body, :lang(es) body, :lang(pt) body, :lang(fr) body, :lang(de) body { font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, "Noto Sans", sans-serif; }
:lang(en) h1, :lang(es) h1, :lang(pt) h1, :lang(fr) h1, :lang(de) h1 { letter-spacing: 1px; }
html.lang-wait #app, html.lang-wait .panel { visibility: hidden; }
#t-lang { display: inline-block; margin-left: 8px; vertical-align: top; }
.langsw { position: relative; display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 6px 12px; border: 2px solid #1b1b1d; background: #fff; font-size: 14px; font-weight: 800; }
.langsw svg { width: 16px; height: 16px; }
.langsw select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; cursor: pointer; }
