* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #efe6d6; color: #2a1d17; 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; }
#c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
p, span, div { word-break: auto-phrase; text-wrap: pretty; }

button, .button { font: inherit; font-size: 16px; font-weight: 700; color: #2a1d17; background: #fff; border: 2px solid #2a1d17; border-radius: 22px;
  padding: 0 18px; height: 44px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; }
button.primary { background: #c8462c; border-color: #c8462c; color: #fff; }
button:disabled { opacity: 0.35; cursor: default; }
[hidden] { display: none !important; }

#title { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; overflow-y: auto; overscroll-behavior: contain;
  background: #efe6d6; padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 10; }
#title .box { width: 100%; max-width: 360px; text-align: center; margin: auto; }
#tart { width: 100%; height: clamp(150px, 34vh, 280px); display: block; margin: 0 auto 6px; }
h1 { font-size: 40px; letter-spacing: 2px; margin: 0 0 4px; white-space: nowrap; text-wrap: balance; }
.sub { margin: 0 0 18px; font-size: 16px; font-weight: 700; color: #6f5a48; }
button.big { width: 100%; height: 52px; font-size: 18px; border-radius: 26px; }
#title-guide { min-height: 28px; margin-top: 10px; font-size: 13px; }

#foot { position: fixed; left: 0; right: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding-bottom: 4px; z-index: 5; pointer-events: none; }
#foot > * { pointer-events: auto; }
#done { min-width: min(200px, 60vw); }

#result { position: fixed; inset: 0; overflow-y: auto; overscroll-behavior: contain; background: #efe6d6;
  padding: 12px 12px calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 10; }
#view { display: block; margin: 0 auto; }
.row { display: flex; gap: 8px; justify-content: center; max-width: 440px; margin: 8px auto 0; }
#r-post { flex: 1.6; background: #1b1b1d; border-color: #1b1b1d; color: #fff; font-size: 15px; padding: 0 8px; }
#r-post svg { width: 15px; height: 15px; }
#again { flex: 1; font-size: 14px; padding: 0 4px; }
#r-after { max-width: 440px; margin: 10px auto 0; }
: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: 0; font-size: min(40px, 10vw); }
html.lang-wait #app, html.lang-wait #title, html.lang-wait #foot { visibility: hidden; }
#t-lang { margin: -10px 0 10px; }
.langsw { position: relative; display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 6px 12px; border: 2px solid #2a1d17; border-radius: 20px; 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; }
