:root {
  --ink: #404356;
  --soft-ink: #777987;
  --paper: #fffaf2;
  --white: #fff;
  --peach: #fff1dc;
  --yellow: #ffe2a0;
  --coral: #ff8292;
  --coral-strong: #f56e82;
  --mint: #80d9c0;
  --blue: #8bc7f3;
  --lilac: #c7b0ee;
  --stroke: #eee8e4;
  --shadow: 0 15px 55px rgba(154, 126, 104, .11);
  font-synthesis: none;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: ui-rounded, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, system-ui, sans-serif; }
button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #329a9c; outline-offset: 4px; }
.site-wrap { min-height: 100dvh; overflow-x: hidden; }
.topbar { width: min(1210px, calc(100% - 48px)); height: 95px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
.brand-icon { position: relative; display: inline-block; width: 50px; height: 44px; }
.brand-icon span { position: absolute; display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; border: 2px solid white; color: var(--ink); font-size: 11px; font-weight: 1000; box-shadow: 0 2px 3px rgba(102, 87, 82, .12); }
.brand-icon span:nth-child(1) { background: #ffc37f; top: 8px; left: 1px; }
.brand-icon span:nth-child(2) { background: #93ddf6; top: 0; left: 17px; }
.brand-icon span:nth-child(3) { background: #ffa0b0; top: 17px; left: 20px; }
.brand-text { font-weight: 1000; font-size: 26px; letter-spacing: -.9px; }
.brand-text span, .footer strong span { color: var(--coral-strong); }
.header-copy { margin-right: auto; color: #93929a; font-size: 13px; font-weight: 800; padding-left: 20px; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.small-action { min-height: 43px; display: inline-flex; justify-content: center; align-items: center; gap: 7px; padding: 9px 14px; background: white; border: 1px solid #ede8e4; border-radius: 13px; font-size: 12px; font-weight: 900; color: #666578; box-shadow: 0 3px 0 #f2ece5; white-space: nowrap; }
.small-action:hover { background: #fffcf8; border-color: #f6d7a3; }
.small-action.sound-off .audio-waves { opacity: .2; }
.fullscreen-top { color: #585b70; border-color: #e5dfe8; }
.page-heading { text-align: center; padding: 15px 16px 25px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: #a78376; background: #fff0de; border-radius: 100px; padding: 8px 18px; font-size: 12px; font-weight: 900; }
.eyebrow-sparkle { color: #fcab5d; font-size: 15px; }
.page-heading h1 { font-size: clamp(25px, 3.3vw, 43px); line-height: 1.4; letter-spacing: -.085em; font-weight: 1000; margin: 15px 0 9px; }
.marker { position: relative; z-index: 0; white-space: nowrap; }
.marker::before { content: ""; z-index: -1; position: absolute; left: 0; right: -.035em; bottom: -.04em; height: .4em; transform: rotate(-1deg); border-radius: 12px; background: #ffdf91; }
.page-heading p { margin: 0; color: var(--soft-ink); font-size: 13px; font-weight: 700; line-height: 1.8; }
.app-layout { width: min(1210px, calc(100% - 48px)); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); align-items: stretch; gap: 19px; }
.draw-panel, .results-panel { min-width: 0; border-radius: 31px; box-shadow: var(--shadow); }
.draw-panel { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; background: #fff1d7; border: 1px solid #f7e0be; padding: 27px 31px 24px; min-height: 590px; }
.draw-panel::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(circle at 50% 39%, #fff9e9 0, #fff2d9 44%, #ffeed0 100%); }
.draw-panel::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .33; pointer-events: none; background-image: radial-gradient(#f6cb93 .8px, transparent .8px); background-size: 18px 18px; mask-image: linear-gradient(to bottom, transparent 8%, #000 50%, transparent 97%); }
.draw-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.draw-top h2 { display: inline-flex; align-items: center; gap: 9px; font-size: 15px; letter-spacing: -.025em; font-weight: 1000; margin: 0; }
.circle-indicator { display: block; width: 12px; height: 12px; background: #ff91a2; border: 3px solid white; border-radius: 50%; box-shadow: 0 0 0 3px #ffb4ba; }
.small-counter { border-radius: 100px; font-size: 13px; letter-spacing: .015em; font-weight: 900; color: #8d746b; background: rgba(255,255,255,.75); border: 1px solid #ffe2bf; padding: 7px 12px; }
.draw-center { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 13px; padding: 15px 0 7px; }
.draw-label { margin: 0; color: #b28e7e; font-size: 13px; letter-spacing: .14em; font-weight: 900; }
.ball-shell { width: clamp(215px, 23vw, 275px); aspect-ratio: 1; display: grid; place-items: center; position: relative; border-radius: 50%; background: conic-gradient(from 28deg, #ff9eaa, #ffc3b0, #f8d7a1, #b4ebd6, #a9d9fb, #ceb7f1, #ff9eaa); box-shadow: 0 13px 0 #e7cda9, 0 19px 35px rgba(181,122,93,.14); padding: 13px; transform: rotate(-6deg); }
.ball-shell::after { position: absolute; content: ""; inset: 2px; border-radius: inherit; border: 3px solid rgba(255,255,255,.45); pointer-events: none; }
.ball-face { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #fffefa; border-radius: 50%; border: 3px solid white; box-shadow: inset 0 6px 19px rgba(230,211,188,.2); transform: rotate(6deg); }
.ball-letter { font-size: 18px; font-weight: 1000; letter-spacing: .14em; color: #f38d9b; margin-bottom: -12px; }
.ball-number { font-family: ui-rounded, "Trebuchet MS", "Arial Rounded MT Bold", system-ui, sans-serif; font-weight: 1000; font-variant-numeric: tabular-nums; letter-spacing: -.07em; font-size: clamp(108px, 12vw, 137px); line-height: 1.3; color: #3f4254; padding-right: .06em; }
.ball-sparkle { position: absolute; font-size: 37px; color: #f8a3a5; text-shadow: 0 2px white; }
.ball-sparkle-a { left: -42px; top: 34px; }
.ball-sparkle-b { right: -42px; bottom: 21px; color: #8bcfba; }
.float-sticker { position: absolute; z-index: -1; font-weight: 1000; pointer-events: none; }
.sticker-one { font-size: 35px; color: #ffc076; left: 11%; top: 26%; transform: rotate(-14deg); }
.sticker-two { font-size: 27px; color: #adc9ea; right: 12%; top: 25%; }
.sticker-three { font-size: 19px; color: #ffb0af; right: 14%; bottom: 30%; }
.draw-message { text-align: center; color: #8e837e; font-weight: 800; font-size: 13px; min-height: 21px; margin: 2px 0 0; }
.draw-controls { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 11px; }
.primary-button { width: min(100%, 318px); min-height: 65px; padding: 11px 22px; display: flex; align-items: center; justify-content: center; gap: 13px; color: white; background: #ff8694; border: 2px solid #ff7288; border-bottom: 6px solid #dd6d7c; border-radius: 20px; font-size: 22px; font-weight: 1000; box-shadow: 0 8px 20px rgba(255,120,143,.18); transition: filter .15s, transform .15s; }
.primary-button:hover:not(:disabled) { filter: brightness(1.04); transform: translateY(-2px); }
.primary-button:active:not(:disabled) { transform: translateY(3px); border-bottom-width: 3px; }
.primary-button:disabled { filter: saturate(.45); opacity: .8; }
.button-star { color: #fff5b8; font-size: 21px; }
.button-arrow { font-size: 22px; font-weight: 1000; margin-left: 2px; }
.primary-button.is-spinning { background: #71ccb4; border-color: #60c4ab; border-bottom-color: #3da78c; box-shadow: 0 8px 20px rgba(96,196,171,.16); }
.secondary-controls { min-height: 34px; display: flex; align-items: center; justify-content: center; gap: 13px; }
.link-action { display: inline-flex; align-items: center; gap: 5px; padding: 5px; background: none; border: none; color: #887d7c; font-size: 12px; font-weight: 900; }
.link-action span { font-size: 18px; }
.link-action:disabled { opacity: .36; }
.link-action:hover:not(:disabled) { color: #c86d7e; }
.separator { height: 15px; width: 1px; background: #dfc8b8; }
.results-panel { background: white; border: 1px solid #f4ece5; display: flex; flex-direction: column; padding: 29px 27px 21px; min-height: 590px; }
.results-heading { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.results-overline { color: #de9b98; font-size: 10px; font-weight: 1000; letter-spacing: .18em; margin: 0 0 6px; }
.results-heading h2 { margin: 0; font-size: clamp(18px, 1.7vw, 23px); letter-spacing: -.06em; }
.results-flower { font-size: 25px; color: #f6ba61; }
.results-description { font-size: 11px; color: #9996a2; margin: 7px 0 0; font-weight: 700; }
.history-total { flex: 0 0 auto; font-weight: 900; font-size: 12px; border-radius: 40px; color: #ab8886; background: #fff1ee; padding: 8px 10px; }
.history-list { flex: 1 1 auto; min-height: 235px; display: flex; align-content: center; align-items: center; justify-content: center; flex-wrap: wrap; column-gap: 11px; row-gap: 11px; padding: 24px 3px 8px; }
.history-list.has-history { align-content: flex-start; justify-content: flex-start; }
.history-pill { flex: 0 0 auto; position: relative; display: grid; place-items: center; width: clamp(57px, 5vw, 67px); height: clamp(57px, 5vw, 67px); border: 4px solid var(--group-color); background: #fff; border-radius: 50%; box-shadow: 0 3px 0 rgba(149,140,137,.06); color: #4b4a59; font-weight: 1000; font-size: 24px; font-variant-numeric: tabular-nums; }
.history-pill.latest { background: var(--group-light); outline: 2px solid #fff; box-shadow: 0 0 0 3px var(--group-color); }
.history-pill.latest::after { content: "NEW"; position: absolute; top: -13px; right: -4px; font-size: 8px; background: #ff8292; color: white; padding: 3px 5px; border-radius: 10px; letter-spacing: .04em; }
.history-pill.group-B { --group-color: #89c8f5; --group-light: #e7f5ff; }
.history-pill.group-I { --group-color: #c4b3ef; --group-light: #f1ecfd; }
.history-pill.group-N { --group-color: #83d8b2; --group-light: #e4f8eb; }
.history-pill.group-G { --group-color: #ffbe68; --group-light: #fff4de; }
.history-pill.group-O { --group-color: #ff9ba3; --group-light: #fff0f1; }
.empty-state { text-align: center; color: #a9a4ad; }
.empty-state>span { display: block; color: #ffcd97; font-size: 47px; margin-bottom: 9px; }
.empty-state strong { display: block; font-size: 15px; color: #797985; }
.empty-state p { font-size: 12px; margin: 8px 0; }
.show-more-wrap { min-height: 35px; text-align: center; }
.history-toggle { padding: 9px 16px; background: #fff6f0; color: #b87d7b; border: 1px solid #f5e5df; border-radius: 100px; font-size: 12px; font-weight: 900; }
.history-toggle:hover { background: #ffebe6; }
.results-summary { margin-top: 17px; padding: 17px 19px 15px; background: #f8faf8; border: 1px solid #f2f2ee; border-radius: 20px; }
.summary-label { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 900; color: #7c8581; }
.summary-label strong { color: #6cc5ae; font-size: 15px; }
.progress-track { height: 11px; background: #e5ebe7; margin: 10px 0 14px; overflow: hidden; border-radius: 25px; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg,#8fd9c2,#8dcaf2,#f1c6ad); border-radius: inherit; transition: width .24s ease; }
.summary-stats { display: flex; justify-content: space-between; gap: 15px; }
.summary-stat { width: 48%; display: flex; align-items: baseline; justify-content: space-between; gap: 5px; color: #a1a4a5; font-size: 12px; font-weight: 800; }
.summary-stat strong { font-size: 27px; color: #68687a; font-variant-numeric: tabular-nums; }
.summary-stat small { font-size: 12px; margin-left: 3px; }
.results-footnote { display: flex; align-items: center; gap: 6px; justify-content: center; color: #9a9da1; font-size: 11px; font-weight: 800; margin-top: 15px; }
.results-footnote span { color: #5ec4a9; font-size: 16px; }
.feature-ribbon { margin: 22px auto 0; width: min(1210px, calc(100% - 48px)); display: flex; gap: 15px; align-items: center; justify-content: center; flex-wrap: wrap; color: #81858a; font-size: 12px; font-weight: 800; }
.feature-ribbon>span { display: inline-flex; align-items: center; gap: 7px; padding: 5px 6px; }
.feature-ribbon b { color: white; background: #8ed6bb; width: 18px; height: 18px; display: inline-grid; place-items: center; border-radius: 50%; font-size: 11px; }
.guide-section,.faq-section { width: min(1210px, calc(100% - 48px)); margin: 74px auto 0; }
.section-title { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; }
.section-title h2 { margin: 0; font-size: 23px; letter-spacing: -.06em; }
.title-icon { display: grid; place-items: center; width: 41px; height: 41px; color: #d67e74; background: #ffe2c5; border-radius: 13px; font-size: 24px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 15px; }
.guide-grid article { background: white; border: 1px solid #f2ebe5; border-radius: 22px; padding: 25px 22px; box-shadow: 0 5px 22px rgba(121,101,90,.035); }
.guide-number { display: inline-grid; place-items: center; height: 35px; width: 45px; border-radius: 10px; background: #e1f6ee; color: #55ab95; font-size: 16px; font-weight: 1000; }
.guide-grid article:nth-child(2) .guide-number { background: #fff0d8; color: #e2a45f; }
.guide-grid article:nth-child(3) .guide-number { background: #fff0f0; color: #ed8e99; }
.guide-grid h3 { margin: 15px 0 7px; font-size: 16px; }
.guide-grid p { font-size: 13px; color: #85858d; font-weight: 700; line-height: 1.85; margin: 0; }
.faq-section { margin-top: 60px; }
.question-icon { background: #e9e5fd; color: #937cc1; font-weight: 1000; }
.faq-section details { border-bottom: 1px solid #eae5e0; padding: 19px 12px; }
.faq-section summary { cursor: pointer; font-size: 14px; font-weight: 900; }
.faq-section details p { font-size: 13px; line-height: 1.95; color: #85858d; margin-bottom: 0; }
.footer { width: min(1210px, calc(100% - 48px)); border-top: 1px solid #eee8e4; margin: 65px auto 0; min-height: 93px; padding: 27px 0; display: flex; align-items: center; justify-content: space-between; gap: 15px; font-size: 12px; color: #9a9798; font-weight: 700; }
.footer strong { font-size: 19px; color: var(--ink); font-weight: 1000; }
.footer small { font-size: 11px; }
.presentation-exit { position: fixed; z-index: 90; top: 14px; right: 17px; border: 1px solid #e8e0d7; border-radius: 13px; background: rgba(255,255,255,.96); box-shadow: 0 4px 20px rgba(121,95,71,.12); color: #675d60; padding: 10px 14px; font-size: 12px; font-weight: 900; display: none; }
.reset-dialog { border: 0; border-radius: 24px; width: min(410px, calc(100% - 30px)); padding: 30px; text-align: center; box-shadow: 0 30px 70px rgba(61,49,57,.25); color: var(--ink); }
.reset-dialog::backdrop { background: rgba(51,47,59,.5); }
.dialog-symbol { margin: 0 auto 14px; display: grid; place-items: center; background: #fff0ed; border-radius: 18px; width: 57px; height: 57px; font-size: 37px; color: #ff899b; }
.reset-dialog h2 { font-size: 20px; margin: 0 0 9px; }
.reset-dialog p { color: #85858d; font-size: 13px; line-height: 1.7; }
.dialog-actions { display: flex; gap: 12px; margin-top: 24px; }
.dialog-actions button { flex: 1; min-height: 48px; border-radius: 13px; font-size: 13px; font-weight: 900; }
.dialog-cancel { background: #fff; border: 1px solid #e5dfe0; color: #626373; }
.dialog-confirm { color: white; background: #ff8998; border: 1px solid #f5788b; }
.toast { position: fixed; z-index: 200; bottom: 25px; left: 50%; transform: translate(-50%, 15px); background: #424255; color: white; padding: 13px 21px; font-size: 13px; font-weight: 800; border-radius: 40px; box-shadow: 0 7px 25px rgba(61,55,66,.22); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; text-align: center; max-width: calc(100% - 24px); }
.toast.visible { opacity: 1; transform: translate(-50%,0); }
.sr-only { position: absolute!important; width: 1px!important; height: 1px!important; padding: 0!important; margin: -1px!important; overflow: hidden!important; clip: rect(0,0,0,0)!important; white-space: nowrap!important; border: 0!important; }
.ball-shell.is-rolling { animation: spin-bob .4s ease-in-out infinite alternate; }
.ball-shell.is-landed { animation: pop-land .55s cubic-bezier(.2,1.4,.5,1); }
@keyframes spin-bob { from { transform: rotate(-11deg) scale(.98); } to { transform: rotate(6deg) scale(1.035); } }
@keyframes pop-land { 0% { transform: rotate(-12deg) scale(.86); } 60% { transform: rotate(7deg) scale(1.09); } 100% { transform: rotate(-6deg) scale(1); } }
/* Presentation mode: roomy two-column stage and recently drawn results, not a 75-cell grid */
body.presentation { overflow: hidden; background: #fff5e9; }
body.presentation .topbar, body.presentation .page-heading, body.presentation .feature-ribbon, body.presentation .guide-section, body.presentation .faq-section, body.presentation .footer { display: none; }
body.presentation .app-layout { width: 100%; max-width: none; height: 100dvh; padding: 9px; margin: 0; gap: 9px; grid-template-columns: 52fr 48fr; }
body.presentation .draw-panel, body.presentation .results-panel { min-height: 0; height: 100%; border-radius: 20px; }
body.presentation .draw-panel { padding: clamp(17px,2.5vh,35px); }
body.presentation .draw-top h2 { font-size: clamp(13px,2.1vw,26px); }
body.presentation .small-counter { font-size: clamp(12px,1.5vw,18px); }
body.presentation .draw-center { gap: clamp(4px,1.3vh,18px); padding: 10px 0; }
body.presentation .draw-label { font-size: clamp(13px,2vh,24px); }
body.presentation .ball-shell { width: min(31vw,42vh,385px); padding: clamp(11px,1.5vw,20px); }
body.presentation .ball-letter { font-size: clamp(15px,3vh,28px); margin-bottom: -.5em; }
body.presentation .ball-number { font-size: clamp(120px, min(18vw,28vh), 230px); }
body.presentation .draw-message { font-size: clamp(13px,2vh,22px); }
body.presentation .primary-button { min-height: clamp(55px,8.5vh,85px); width: min(100%, 440px); font-size: clamp(20px,2.5vw,31px); }
body.presentation .link-action { font-size: clamp(12px,1.4vw,18px); }
body.presentation .results-panel { padding: clamp(18px,2.5vh,35px) clamp(15px,2.5vw,36px); }
body.presentation .results-heading h2 { font-size: clamp(17px,2.15vw,31px); }
body.presentation .results-description { font-size: clamp(11px,1.1vw,14px); }
body.presentation .history-list { min-height: 0; flex: 1 1 0; overflow-y: auto; align-content: flex-start; justify-content: flex-start; padding: 30px 8px 12px; gap: clamp(9px,1.2vw,19px); scrollbar-width: thin; }
body.presentation .history-list:not(.has-history) { justify-content: center; align-content: center; }
body.presentation .history-pill { width: clamp(55px,5.7vw,97px); height: clamp(55px,5.7vw,97px); font-size: clamp(23px,2.65vw,45px); border-width: clamp(4px,.44vw,7px); }
body.presentation .results-summary { padding: clamp(12px,2vh,24px); margin-top: 7px; }
body.presentation .results-footnote { margin-top: 10px; }
body.presentation .presentation-exit { display: block; }
body.presentation .results-heading { padding-right: 100px; }
@media (min-width: 1250px) and (min-height: 850px) { body.presentation .draw-label { margin-bottom: 8px; } }
@media (max-width: 980px) {
  .topbar { width: calc(100% - 28px); }
  .header-copy { display: none; }
  .app-layout,.feature-ribbon,.guide-section,.faq-section,.footer { width: calc(100% - 28px); }
  .app-layout { gap: 13px; }
  .draw-panel { padding: 23px 18px; }
  .results-panel { padding: 25px 17px 20px; }
  .history-list { gap: 8px; }
  .history-pill { width: 57px; height: 57px; font-size: 23px; }
  .results-heading h2 { font-size: 17px; }
}
@media (max-width: 720px) {
  .topbar { height: 74px; }
  .brand { gap: 6px; }
  .brand-icon { transform: scale(.82); transform-origin: left center; width: 42px; }
  .brand-text { font-size: 20px; }
  .top-actions { gap: 6px; }
  .small-action { font-size: 11px; padding: 8px 10px; min-height: 39px; gap: 4px; }
  .small-action svg { width: 16px; }
  .page-heading { padding: 17px 16px 23px; }
  .page-heading h1 { font-size: clamp(24px,5vw,34px); }
  .page-heading p { max-width: 450px; margin: 0 auto; }
  .app-layout { grid-template-columns: 1fr; }
  .draw-panel { min-height: 540px; padding: 22px 20px 18px; }
  .draw-center { padding: 17px 0 4px; }
  .ball-shell { width: min(59vw,254px); }
  .ball-number { font-size: clamp(105px,27vw,135px); }
  .primary-button { min-height: 61px; }
  .results-panel { min-height: 375px; padding: 24px 21px 19px; }
  .results-heading h2 { font-size: 20px; }
  .history-list { min-height: 150px; padding: 24px 0 14px; }
  .history-pill { width: 61px; height: 61px; font-size: 23px; }
  .feature-ribbon { margin-top: 10px; gap: 2px 13px; }
  .feature-ribbon>span { font-size: 11px; }
  .guide-section,.faq-section { margin-top: 48px; }
  .section-title h2 { font-size: 20px; }
  .guide-grid { grid-template-columns: 1fr; gap: 11px; }
  .guide-grid article { padding: 20px; }
  .footer { flex-wrap: wrap; margin-top: 45px; min-height: 80px; }
  .footer small { margin-left: auto; }
  body.presentation { overflow: auto; }
  body.presentation .app-layout { display: flex; flex-direction: column; overflow-y: auto; height: 100dvh; padding: 7px; gap: 7px; }
  body.presentation .draw-panel { flex: 0 0 auto; height: auto; min-height: min(66dvh,520px); padding: 18px 14px 10px; }
  body.presentation .results-panel { height: auto; min-height: 230px; flex: 0 0 auto; padding: 17px; }
  body.presentation .draw-top h2 { font-size: 15px; }
  body.presentation .small-counter { font-size: 12px; margin-right: 110px; }
  body.presentation .draw-center { gap: 4px; padding: 8px 0; }
  body.presentation .ball-shell { width: min(42vw,29dvh,195px); padding: 10px; }
  body.presentation .ball-number { font-size: clamp(83px,21vw,117px); }
  body.presentation .ball-letter { font-size: 13px; margin-bottom: -10px; }
  body.presentation .primary-button { min-height: 56px; width: min(100%,300px); font-size: 19px; }
  body.presentation .results-heading { padding-right: 0; }
  body.presentation .results-heading h2 { font-size: 17px; }
  body.presentation .history-list { overflow: visible; min-height: 95px; padding: 23px 0 8px; }
  body.presentation .history-pill { width: 59px; height: 59px; font-size: 23px; }
  body.presentation .results-summary { padding: 12px; }
  body.presentation .presentation-exit { top: 8px; right: 9px; padding: 8px 10px; font-size: 11px; }
}
@media (max-width: 400px) {
  .brand-text { font-size: 17px; }
  .brand-icon { transform: scale(.75); width: 35px; }
  .small-action { padding: 7px; }
  .draw-panel { min-height: 520px; }
  .history-pill { width: 55px; height: 55px; }
  .results-panel { padding-inline: 15px; }
  .results-heading h2 { font-size: 18px; }
  .results-description { font-size: 10px; }
  .summary-stat strong { font-size: 22px; }
}
@media (max-height: 620px) and (min-width: 721px) {
  body.presentation .draw-panel { padding: 12px 20px; }
  body.presentation .draw-center { gap: 2px; padding: 2px 0; }
  body.presentation .ball-shell { width: min(30vw,37vh,260px); }
  body.presentation .ball-number { font-size: clamp(83px,18vh,120px); }
  body.presentation .ball-letter { margin-bottom: -6px; }
  body.presentation .primary-button { min-height: 48px; }
  body.presentation .results-panel { padding-block: 12px; }
  body.presentation .results-summary { padding: 10px; }
  body.presentation .history-list { padding-top: 15px; }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation-duration: .01ms!important; animation-iteration-count: 1!important; scroll-behavior: auto!important; transition-duration: .01ms!important; } }
.history-list.is-expanded { max-height: 400px; min-height: 235px; overflow-y: auto; align-content: flex-start; justify-content: flex-start; scrollbar-width: thin; }
body.presentation .history-list.is-expanded { max-height: none; }
@media (max-width: 720px) { body.presentation .history-list.is-expanded { max-height: 320px; overflow-y: auto; } }
@media (min-width: 721px) and (min-height: 621px) {
  body.presentation .draw-message { margin-top: 17px; }
}
/* Phase 2: clean header navigation and contextual drawing tools */
.nav-action { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:42px; padding:9px 15px; text-decoration:none; color:var(--ink); border:1px solid #eadfdf; border-radius:13px; background:#fff; box-shadow:0 3px 0 #f1e8df; font-size:13px; font-weight:900; white-space:nowrap; }
.nav-action:hover { background:#fff1de; border-color:#f4c9a2; }
.lang-link { color:#d4667b; font-size:14px; }
.lang-link span { font-size:10px; }
.tools-link-icon { font-size:20px; line-height:1; color:#76b7a7; }
.draw-top { flex-wrap:wrap; }
.stage-tools { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex:1 1 auto; }
.stage-tool { min-height:35px; display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:7px 11px; border-radius:10px; border:1px solid #eadac6; color:#675e66; background:#fff9f2; font-size:11px; font-weight:900; white-space:nowrap; }
.stage-tool:hover { background:#fff; border-color:#eabb90; }
.stage-tool.sound-off .audio-waves { opacity:.17; }
.stage-tool svg { flex:0 0 auto; }
body.presentation .stage-tools #fullscreenBtn { display:none; }
body.presentation .stage-tools { justify-content:flex-start; }
body.presentation .draw-top { padding-right:2px; }
.hero-card-link { display:inline-flex; align-items:center; gap:8px; text-decoration:none; font-size:12px; font-weight:900; margin-top:14px; padding:8px 15px; color:#b97470; background:#fff5ee; border:1px solid #f6e2d4; border-radius:100px; }
.hero-card-link:hover {background:#ffefe2;}
/* Bingo card builder area */
.cards-section { width:min(1210px,calc(100% - 48px)); margin:70px auto 0; scroll-margin-top:24px; }
.cards-title { align-items:flex-start; }
.cards-eyebrow { margin:0 0 5px; color:#d49589; font-size:10px; font-weight:1000; letter-spacing:.15em; }
.cards-lead { color:#898995; margin:8px 0 0; font-size:13px; line-height:1.8; font-weight:700; }
.card-workbench { display:grid; grid-template-columns:minmax(280px,.85fr) minmax(0,1.15fr); gap:17px; align-items:stretch; }
.card-settings,.card-preview-panel { min-width:0; background:#fff; border:1px solid #f0e9e6; border-radius:27px; padding:26px; box-shadow:0 7px 25px rgba(143,108,88,.06); }
.card-settings { background:linear-gradient(150deg,#fffaf5 0%,#fff 70%); }
.card-settings-title>span { display:inline-grid; place-items:center; width:39px; height:39px; margin-bottom:15px; border-radius:12px; background:#fff1da; color:#e8a056; font-size:22px; }
.card-settings-title strong { display:block; font-size:20px; font-weight:1000; }
.card-settings-title p { color:#8b8991; font-size:12px; line-height:1.8; font-weight:700; margin:7px 0 20px; }
.card-form { display:grid; gap:17px; }
.field-wrap { display:flex; flex-direction:column; gap:8px; font-weight:900; font-size:13px; }
.field-wrap small { font-size:11px; color:#95919a; }
.field-wrap input,.field-wrap select { font:inherit; min-height:49px; font-size:14px; font-weight:900; color:var(--ink); background:#fff; border:1px solid #e6dedc; border-radius:11px; padding:11px 13px; width:100%; }
.field-wrap input:focus,.field-wrap select:focus { outline:3px solid #bbdfd8; outline-offset:2px; }
.input-unit { position:relative; }
.input-unit b { position:absolute; right:14px; top:50%; transform:translateY(-50%); color:#a2a0a7; font-size:12px; pointer-events:none; }
.input-unit input { padding-right:42px; }
.card-form-actions { margin-top:24px; display:flex; gap:9px; }
.card-form-actions button { border-radius:14px; min-height:53px; padding:10px 15px; font-size:13px; font-weight:1000; }
.create-cards-btn { flex:1 1 auto; color:#fff; background:#fc8796; border:2px solid #f47588; box-shadow:0 4px 0 #e5677b; }
.create-cards-btn:hover { filter:brightness(1.025); }
.print-cards-btn { color:#4b786d; background:#e8f9f3; border:2px solid #c7ecdf; white-space:nowrap; }
.print-cards-btn:disabled { opacity:.45; }
.card-help { display:flex; align-items:flex-start; gap:7px; margin-top:22px; padding:13px; background:#fff8ef; border:1px solid #f5eadd; border-radius:13px; }
.card-help>span { color:#d29b77; font-size:17px; }
.card-help p { margin:0; color:#928880; font-size:11px; line-height:1.85; font-weight:700; }
.preview-top { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:16px; }
.preview-kicker { color:#d49b91; font-size:10px; font-weight:1000; letter-spacing:.13em; }
.preview-top h3 { font-size:18px; margin:4px 0 0; }
.cards-badge { flex:0 0 auto; background:#f1fbf5; color:#65ab93; border-radius:100px; font-size:11px; font-weight:900; padding:9px 11px; }
.card-preview-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.preview-note { margin:15px 0 0; color:#96929c; font-size:11px; font-weight:700; }
.cards-empty { color:#96929c; grid-column:1/-1; font-size:13px; text-align:center; padding:65px 10px; }
/* Cards share one carefully styled 5x5 grid across preview and A4 print */
.bingo-print-card { background:#fff; border:1px solid #e9e7e5; border-radius:12px; overflow:hidden; padding:8px; min-width:0; break-inside:avoid; page-break-inside:avoid; }
.card-mark { display:flex; align-items:center; justify-content:space-between; gap:6px; margin:0 1px 5px; color:#5e606f; }
.card-mark strong { font-size:clamp(9px,.95vw,12px); font-weight:1000; letter-spacing:.005em; }
.card-mark span { font-size:clamp(8px,.8vw,10px); font-weight:900; color:#9b9397; }
.bingo-grid { border-collapse:separate; border-spacing:2px; width:100%; table-layout:fixed; font-variant-numeric:tabular-nums; }
.bingo-grid th { background:#94d1e9; color:#324955; text-align:center; height:23px; font-size:14px; border-radius:5px; font-weight:1000; }
.bingo-grid th.col-1 { background:#c8bbed; }
.bingo-grid th.col-2 { background:#96d9bc; }
.bingo-grid th.col-3 { background:#ffdc93; }
.bingo-grid th.col-4 { background:#ffb7b9; }
.bingo-grid td { height:31px; background:#fcfaf9; border:1px solid #edeae9; border-radius:5px; text-align:center; font-weight:950; color:#4d4d60; font-size:13px; }
.bingo-grid td.free-cell { background:#ffe5b8; border-color:#ffcd87; color:#976137; font-size:8px; letter-spacing:-.02em; }
.card-mark-foot { color:#a6a1a3; font-size:8px; text-align:center; margin-top:5px; font-weight:850; letter-spacing:.035em; }
#printArea { display:none; }
/* Responsive header/buttons and cards */
@media (max-width:1100px) {
 .stage-tools { flex-basis:100%; justify-content:flex-end; }
 .draw-panel { min-height:628px; }
 body.presentation .draw-panel { min-height:0; }
}
@media (max-width:980px) {
 .cards-section { width:calc(100% - 28px); }
 .card-workbench { grid-template-columns:1fr; }
 .card-settings { display:grid; grid-template-columns:1fr 1fr; column-gap:24px; }
 .card-settings-title,.card-help { grid-column:1/-1; }
 .card-form-actions { flex-direction:column; margin-top:0; justify-content:center; }
 .card-preview-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
 .bingo-grid td { height:25px; font-size:11px; }
}
@media (max-width:720px) {
 .nav-action { padding:7px 10px; min-height:38px; font-size:11px; }
 .tools-link-icon { display:none; }
 .cards-section { margin-top:48px; }
 .card-settings { display:block; }
 .card-settings,.card-preview-panel { padding:20px; }
 .card-form-actions { flex-direction:row; margin-top:18px; }
 .card-preview-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .bingo-grid td { height:29px; font-size:13px; }
 .bingo-grid th { height:24px; }
 .stage-tools { flex-basis:auto; }
 .draw-top { gap:10px; }
 .draw-panel { min-height:590px; }
 body.presentation .draw-panel { min-height:min(66dvh,520px); }
 body.presentation .draw-top { padding-right:110px; }
 body.presentation .small-counter { margin-right:0; }
 body.presentation .stage-tools { flex-basis:100%; justify-content:flex-end; }
}
@media (max-width:400px) {
 .nav-action { padding:7px 8px; }
 .tools-link span:last-child { font-size:10px; }
 .card-form-actions button { padding:10px 8px; font-size:12px; }
 .stage-tool { padding:6px 8px; font-size:10px; }
}
@media print {
 @page { size:A4 portrait; margin:10mm; }
 html,body { margin:0!important; padding:0!important; width:auto!important; background:#fff!important; color:#202020!important; }
 body > :not(#printArea) { display:none!important; }
 #printArea { display:block!important; }
 .print-page { width:180mm; box-sizing:border-box; display:flex; flex-wrap:wrap; align-content:flex-start; column-gap:5mm; row-gap:5mm; break-after:page; page-break-after:always; }
 .print-page:last-child { break-after:auto; page-break-after:auto; }
 .print-page .bingo-print-card { box-sizing:border-box; flex:0 0 100%; height:117mm; }
 .print-page.print-layout-4 .bingo-print-card { flex-basis:calc(50% - 2.5mm); }
 .bingo-print-card { border:1px solid #a6a6a6; border-radius:0; padding:4mm; display:flex; flex-direction:column; justify-content:center; min-height:0; }
 .card-mark { margin:0 0 2.5mm; }
 .card-mark strong { font-size:13pt; }
 .card-mark span { font-size:9pt; }
 .bingo-grid { border-spacing:1.2mm; }
 .bingo-grid th { height:9mm; font-size:16pt; border-radius:2mm; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
 .bingo-grid td { height:13mm; font-size:16pt; border:1px solid #ccc; border-radius:1.3mm; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
 .bingo-grid td.free-cell { font-size:9pt; }
 .card-mark-foot { font-size:8pt; margin-top:3mm; }
 .print-layout-2 .bingo-grid th { height:10mm; font-size:20pt; }
 .print-layout-2 .bingo-grid td { height:16mm; font-size:20pt; }
 .print-layout-2 .bingo-grid td.free-cell { font-size:14pt; }
}
/* Presentation mode always focuses on caller and draw history, never the card builder. */
body.presentation .cards-section { display:none!important; }

/* Phase 3 — mobile bingo card / participant flow */
.hero-mobile-link { margin-left:12px; background:#eaf9f5!important; color:#4b8e80!important; border-color:#cfece1!important; }
.mobile-card-section { width:min(1210px,calc(100% - 48px)); margin:76px auto 0; scroll-margin-top:22px; }
.mobile-card-heading { margin-bottom:24px; }
.mobile-card-layout { display:grid; grid-template-columns:minmax(0,.88fr) minmax(0,1.12fr); align-items:start; gap:20px; }
.mobile-intro,.mobile-play-area { border:1px solid #f1e7e1; border-radius:28px; box-shadow:var(--shadow); min-width:0; }
.mobile-intro { background:#fff; padding:29px 30px; }
.mobile-step-tag { display:inline-block; background:#fff0e9; color:#bf7c78; font-size:12px; font-weight:1000; padding:9px 13px; border-radius:40px; }
.mobile-intro h3 { margin:16px 0 9px; font-size:clamp(18px,2vw,23px); font-weight:1000; }
.mobile-intro>p { color:#777582; font-size:13px; font-weight:700; line-height:1.9; }
.mobile-steps { margin:18px 0 25px; padding:0 0 0 22px; color:#686b7d; font-weight:850; font-size:13px; line-height:2.4; }
.mobile-steps li::marker { color:#f5899c; font-weight:1000; }
.join-box { border-radius:20px; border:1px solid #f4e9d7; background:#fff9ed; padding:19px; }
.join-box strong { font-weight:1000; font-size:15px; }
.join-box p { margin:8px 0 13px; color:#85828b; font-size:12px; line-height:1.85; font-weight:750; }
.join-actions { display:flex; gap:8px; }
.mobile-secondary-btn { border:1px solid #cce7e0; border-bottom:3px solid #b1dcd0; padding:11px 14px; color:#427e73; background:#ebfaf4; font-size:12px; font-weight:1000; border-radius:12px; min-height:43px; }
.mobile-secondary-btn:hover:not(:disabled) { background:#ddf4eb; }
.mobile-secondary-btn:disabled { opacity:.44; cursor:not-allowed; }
.mobile-qr-box { margin-top:16px; display:flex; flex-direction:column; align-items:center; }
.mobile-qr-box svg { max-width:100%; border:1px solid #f0e8de; border-radius:14px; background:#fff; box-sizing:content-box; padding:10px; }
.mobile-qr-box .mobile-qr-hint { margin:0; text-align:center; color:#a8a0a0; font-size:11px; }
.mobile-qr-caption { margin:6px 0 0!important; font-size:11px!important; }
.mobile-privacy-note { background:#f8fafb; border-radius:12px; padding:13px; font-size:11px!important; line-height:1.9!important; }
.mobile-play-area { background:linear-gradient(145deg,#fff9ee 0%,#fff 48%,#f2faf8 100%); padding:27px; }
.mobile-card-topline { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; margin-bottom:12px; }
.mobile-card-brand { font-weight:1000; font-size:17px; letter-spacing:-.04em; color:#4d5061; }
.mobile-card-brand em { color:#ed8b9b; font-style:normal; }
.mobile-card-chip { display:inline-flex; border-radius:60px; background:#fff0e5; color:#b78f7f; font-size:10px; font-weight:1000; letter-spacing:.1em; padding:8px 11px; }
.mobile-status { min-height:52px; display:flex; align-items:center; justify-content:center; margin:0 0 12px; padding:8px 12px; border-radius:13px; background:#f7f8fa; color:#5f677a; font-size:14px; font-weight:950; text-align:center; }
.mobile-status.is-reach { background:#fff0d5; color:#946529; }
.mobile-status.is-bingo { color:#c35c6b; background:#ffe6e8; }
@keyframes bingoPulsate { 0%,100%{transform:scale(1)} 50%{transform:scale(1.04)} }
.mobile-status.is-celebrating { animation:bingoPulsate .45s ease 2; }
.mobile-card-board { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:clamp(4px,.65vw,8px); background:#fff; border:1px solid #efebeb; border-radius:20px; padding:clamp(7px,1.5vw,16px); box-shadow:0 5px 20px rgba(102,89,92,.07); }
.mobile-header-cell { min-width:0; min-height:47px; display:grid; place-items:center; border-radius:9px; font-weight:1000; font-size:25px; color:#40485a; }
.mobile-header-cell.mobile-col-0 { background:#9ed8f0; }
.mobile-header-cell.mobile-col-1 { background:#d1c5f2; }
.mobile-header-cell.mobile-col-2 { background:#9ee1c6; }
.mobile-header-cell.mobile-col-3 { background:#ffdb95; }
.mobile-header-cell.mobile-col-4 { background:#ffb9c1; }
.mobile-number-cell { aspect-ratio:1 / 1; width:100%; min-width:0; min-height:0; border:2px solid #e8e7e8; border-bottom:3px solid #dfdfe0; border-radius:10px; background:#fffdfa; display:grid; place-items:center; font:1000 clamp(16px,2.15vw,28px)/1 ui-rounded,'Trebuchet MS',system-ui,sans-serif; font-variant-numeric:tabular-nums; color:#4b4d61; transition:background .16s,transform .12s,border-color .16s; touch-action:manipulation; user-select:none; -webkit-user-select:none; }
.mobile-number-cell:hover:not(:disabled):not(.is-marked) { border-color:#adcac4; background:#f2faf7; }
.mobile-number-cell:active:not(:disabled) { transform:scale(.95); }
.mobile-number-cell.is-marked { background:#c9f1e5; border-color:#72cfb2; color:#306c5d; position:relative; }
.mobile-number-cell.is-marked:after { content:'✓'; position:absolute; top:3px; right:4px; font-size:clamp(10px,1.2vw,15px); font-weight:1000; opacity:.75; }
.mobile-number-cell.is-bingo-line { background:#ffde90; border-color:#f9b949; color:#684a22; }
.mobile-number-cell.is-free { background:#ffe6bd; border-color:#f6c784; color:#906332; font-size:clamp(10px,1.5vw,15px); letter-spacing:-.03em; cursor:default; opacity:1; }
.mobile-number-cell.is-free:after { content:none; }
.mobile-number-cell.is-free.is-bingo-line { background:#ffd98d; }
.mobile-progressline { display:flex; flex-wrap:wrap; justify-content:space-between; margin:15px 2px; gap:10px; color:#7b7d86; font-size:12px; font-weight:900; }
.mobile-progressline>span:last-child { color:#c07f8c; }
.mobile-card-actions { display:flex; gap:10px; }
.mobile-card-actions button { flex:1 1 0; min-height:48px; }
.mobile-new-btn { color:white; background:#fa8898; border:1px solid #f4778c; border-bottom:4px solid #e27082; border-radius:13px; font-size:13px; font-weight:1000; padding:10px 12px; }
.mobile-new-btn:hover { background:#f97c8e; }
.mobile-save-hint { font-size:11px; color:#96939b; font-weight:800; line-height:1.8; text-align:center; margin:17px 0 0; }
body.presentation .mobile-card-section { display:none!important; }
@media(max-width:920px) { .mobile-card-layout { grid-template-columns:1fr; } .mobile-play-area { max-width:650px; width:100%; margin:0 auto; order:-1; } .mobile-intro { max-width:650px; margin:0 auto; width:100%; } .mobile-number-cell { font-size:clamp(20px,4.6vw,29px); } }
@media(max-width:720px) { .mobile-card-section { width:calc(100% - 28px); margin-top:55px; } .mobile-intro { padding:22px; } .mobile-play-area { padding:14px; border-radius:19px; } .mobile-card-board { gap:5px; border-radius:12px; padding:7px; } .mobile-number-cell { border-radius:8px; border-width:1.5px; border-bottom-width:3px; font-size:clamp(17px,5.3vw,25px); } .mobile-header-cell { min-height:36px; font-size:23px; } .mobile-number-cell.is-marked:after { top:1px;right:2px;font-size:11px; } .mobile-status { font-size:13px; min-height:45px; } .mobile-card-actions button { font-size:11px; padding:9px 5px; } .hero-mobile-link { margin-left:5px; margin-top:9px; } }
@media(max-width:360px) { .mobile-play-area {padding:9px;} .mobile-number-cell {font-size:17px;} .mobile-card-board {gap:3px;} .mobile-progressline {font-size:10px;} }
@media(prefers-reduced-motion:reduce) { .mobile-status.is-celebrating {animation:none;} .mobile-number-cell { transition:none; } }

/* Phase 3.1 — clearer host/guest instructions, original Phase 3 game preserved */
.join-guide { width:min(1210px,calc(100% - 48px)); margin:66px auto 0; scroll-margin-top:22px; }
.join-guide-title { margin-bottom:20px; }
.join-guide-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.join-guide-role { min-width:0; background:#fff; border:1px solid #f0e4da; border-radius:24px; padding:26px; box-shadow:0 9px 27px rgba(95,78,78,.055); }
.join-guide-host { background:linear-gradient(135deg,#fff8e9,#fff 72%); }
.join-guide-guest { background:linear-gradient(135deg,#ebfaf5,#fff 72%); }
.join-guide-label { display:inline-flex; border-radius:50px; background:#ffedcf; padding:7px 12px; color:#9f6e43; font-size:12px; font-weight:1000; }
.join-guide-guest .join-guide-label { background:#d8f5e9; color:#367f6b; }
.join-guide-role h3 { margin:14px 0 12px; color:#45475b; font-size:clamp(18px,1.7vw,22px); line-height:1.45; }
.join-guide-role p { color:#717481; font-size:13px; font-weight:700; line-height:1.9; margin:9px 0; }
.join-guide-button { display:inline-flex; justify-content:center; text-decoration:none; margin-top:11px; border-radius:12px; padding:12px 16px; background:#ffbd6c; color:#604732; font-weight:1000; font-size:13px; }
.join-guide-button.secondary { background:#afe6d4; color:#266b5d; }
.join-guide-button:focus-visible,.mobile-qr-dialog button:focus-visible { outline:3px solid #439bda; outline-offset:3px; }
.join-guide-notice { font-size:13px; color:#6d6573; background:#fff9f0; border:1px solid #f2e7db; border-radius:16px; line-height:1.9; padding:15px 18px; font-weight:730; margin:16px 0 0; }
#mobileJoin { scroll-margin-top:24px; }
.join-actions { flex-wrap:wrap; }
.player-tips { margin-top:20px; border-radius:16px; padding:17px 18px; background:#eef9f5; }
.player-tips p { margin:12px 0 0; color:#61756f; font-size:12px; line-height:1.85; font-weight:740; }
.mobile-card-hint { text-align:center; margin:0 0 12px; font-size:12px; color:#617769; font-weight:900; }
.mobile-qr-dialog { width:min(90vw,560px); max-height:90dvh; overflow:auto; border:1px solid #efe8e4; border-radius:25px; padding:24px 28px; background:#fffefb; box-shadow:0 18px 70px rgba(24,32,47,.17); }
.mobile-qr-dialog::backdrop { background:rgba(20,30,42,.7); }
.mobile-qr-dialog-top { display:flex; align-items:center; justify-content:space-between; gap:18px; }
.mobile-qr-dialog h2 { margin:0; font-size:clamp(17px,2vw,23px); color:#3f4755; }
.mobile-qr-dialog button { flex:0 0 auto; cursor:pointer; border:1px solid #eadbd6; background:#fff0e9; color:#6c5b5e; border-radius:12px; font-weight:900; padding:10px 12px; }
.mobile-qr-dialog-content { display:flex; justify-content:center; padding:18px 0 8px; }
.mobile-qr-dialog-content svg { width:min(64vw,360px); height:auto; max-width:100%; background:#fff; border-radius:10px; }
.mobile-qr-dialog>p { text-align:center; color:#636d73; font-size:13px; font-weight:800; margin:10px 0 0; }
body.presentation .join-guide { display:none!important; }
@media(max-width:760px) { .join-guide { width:calc(100% - 28px); margin-top:52px; } .join-guide-grid { grid-template-columns:1fr; gap:12px; } .join-guide-role { padding:20px; } .join-guide-role h3 { font-size:18px; } .mobile-card-hint { font-size:11px; } .mobile-qr-dialog { padding:18px; } }
@media print { .join-guide,.mobile-qr-dialog {display:none!important;} }

/* Phase 3.2 guest card direct link */
.guest-direct-link { display:inline-flex; align-items:center; justify-content:center; text-decoration:none; box-sizing:border-box; }

/* Phase 3.3: show one purpose at a time. */
.mode-panel[hidden] { display:none!important; }
.mode-picker { width:min(1210px,calc(100% - 48px)); margin:0 auto 22px; }
.mode-picker-label { text-align:center; color:#767383; font-size:13px; font-weight:900; margin:0 0 13px; }
.mode-picker-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.mode-choice { border:2px solid #f0e9e2; background:#fff; border-radius:20px; display:flex; align-items:center; justify-content:center; gap:12px; min-height:82px; padding:12px 15px; text-align:left; box-shadow:0 5px 16px rgba(104,83,69,.045); color:#4c4d5c; transition:transform .15s ease,background .15s ease,border .15s ease; }
.mode-choice:hover { transform:translateY(-2px); border-color:#e8cdb8; }
.mode-choice[aria-pressed="true"] { background:#fff3db; border-color:#f8b964; box-shadow:0 5px 0 #f6d8a7; }
.mode-choice[data-mode="print"][aria-pressed="true"] { background:#f2f0ff; border-color:#c5b9f4; box-shadow:0 5px 0 #ded5ff; }
.mode-choice[data-mode="phone"][aria-pressed="true"] { background:#eafaF4; border-color:#9edec8; box-shadow:0 5px 0 #ccecdf; }
.mode-emoji { width:39px; height:39px; border-radius:13px; display:grid; place-items:center; font-size:24px; background:#fff7ef; flex:0 0 auto; }
.mode-copy { display:flex; flex-direction:column; gap:5px; }
.mode-copy strong { font-size:clamp(14px,1.4vw,18px); font-weight:1000; letter-spacing:-.025em; }
.mode-copy small { font-size:11px; color:#858290; font-weight:800; }
#modePrint .cards-section,#modePhone .mobile-card-section { margin-top:19px; }
#modePrint .cards-section { scroll-margin-top:16px; }
.simplified-phone { margin-bottom:18px; }
.simple-share-box { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); background:#fff; border:1px solid #eee6df; border-radius:25px; padding:25px; gap:22px; align-items:center; box-shadow:var(--shadow); }
.simple-share-explain { display:flex; flex-direction:column; align-items:center; text-align:center; gap:10px; }
.simple-share-explain > strong { font-size:20px; font-weight:1000; }
.simple-share-explain > p { color:#85818b; margin:0; font-size:13px; font-weight:750; line-height:1.7; }
.simple-share-explain .mobile-qr-box { min-height:154px; min-width:185px; padding:12px; }
.simple-share-actions { display:flex; flex-direction:column; gap:13px; align-items:stretch; }
.simple-share-actions .mobile-new-btn,.simple-share-actions .mobile-secondary-btn { text-align:center; justify-content:center; min-height:50px; display:flex; align-items:center; border-radius:13px; font-size:14px; text-decoration:none; }
.simple-qr-note { background:#eefaF4; color:#52685f; padding:14px; border-radius:12px; font-size:12px; font-weight:850; line-height:1.8; margin:2px 0 0; }
.simple-after-invite { font-weight:850; color:#838090; text-align:center; font-size:13px; margin:16px 0; }
.faq-section { margin-top:42px; }
body.presentation .mode-picker {display:none!important;}
body.presentation #modeDraw { width:100%; }
@media (max-width:720px) {
 .mode-picker { width:calc(100% - 28px); margin-bottom:15px; }
 .mode-picker-actions { gap:6px; }
 .mode-choice { min-height:76px; border-radius:14px; padding:9px 4px; flex-direction:column; text-align:center; gap:4px; }
 .mode-emoji { font-size:19px; width:25px; height:25px; }
 .mode-copy {gap:2px;}
 .mode-copy strong {font-size:clamp(10px,3vw,13px);white-space:nowrap;}
 .mode-copy small {font-size:9px;}
 .simple-share-box {grid-template-columns:1fr;gap:12px;padding:18px;}
 .simple-share-explain > strong {font-size:19px;}
 .simple-share-actions {gap:9px;}
 .simplified-phone { margin-top:16px!important; }
}
@media (max-width:370px) {.mode-copy small {font-size:8px;}.mode-copy strong {font-size:10px;}}
@media print {.mode-picker,.mode-panel {display:none!important;}}

/* Phase 4.1: social sharing, placed below FAQ (not within first-view). */
.social-share-section { width:min(1210px,calc(100% - 48px)); margin:46px auto 0; padding:24px 28px 18px; border:1px solid #f2e6de; border-radius:24px; background:linear-gradient(115deg,#fff3e4,#fffdf9 58%,#effaf6); box-shadow:0 9px 28px rgba(86,73,66,.045); }
.social-share-intro { display:flex; align-items:center; gap:13px; margin-bottom:16px; }
.social-share-spark { color:#f48699; background:#ffe7ed; display:flex; align-items:center; justify-content:center; width:37px; height:37px; border-radius:12px; font-size:19px; flex-shrink:0; }
.social-share-intro h2 { margin:0; font-size:18px; color:#3f4459; font-weight:900; }
.social-share-intro p { margin:4px 0 0; font-size:12px; font-weight:650; color:#747585; }
.social-share-actions { display:flex; flex-wrap:wrap; align-items:stretch; gap:10px; }
.social-share-btn { display:inline-flex; align-items:center; justify-content:center; gap:9px; border-radius:13px; border:1px solid #eae4e2; background:#fff; color:#424659; min-height:44px; min-width:128px; padding:10px 16px; font-size:13px; font-weight:850; cursor:pointer; transition:transform .15s,background .15s; }
.social-share-btn:hover { transform:translateY(-2px); background:#fff9f5; }
.social-share-btn:focus-visible { outline:3px solid #7abfd2; outline-offset:2px; }
.social-share-mark { font-family:Arial,sans-serif; font-weight:900; display:inline-flex; min-width:17px; align-items:center; justify-content:center; font-size:18px; }
.social-share-facebook .social-share-mark { color:#2873dc; }
.social-share-line .social-share-mark { padding:3px 4px; border-radius:5px; background:#20bd6b; color:#fff; font-size:8px; min-width:25px; }
.social-share-copy .social-share-mark { color:#e58b7f; }
.social-share-feedback { margin:9px 0 0; min-height:15px; font-size:12px; font-weight:700; color:#4b8775; }
body.presentation .social-share-section { display:none!important; }
@media(max-width:720px){.social-share-section{width:calc(100% - 28px); margin-top:34px; padding:19px 15px 12px; border-radius:19px}.social-share-intro h2{font-size:16px}.social-share-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.social-share-btn{min-width:0;font-size:12px;padding:9px 5px;}}
@media print{.social-share-section{display:none!important;}}
