/* Entry screens only. Shared by t-real and t-3d; no table/global overrides. */
:root .app .screen.home,
:root .app .screen.lobby-screen {
  --paper: #f3f0df;
  --muted: #b8c5b5;
  --wood: #d9b17b;
  --ink: #123c2e;
  box-sizing: border-box;
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 812px;
  min-height: 100svh;
  padding: 36px 26px 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--paper);
  background: radial-gradient(ellipse at 50% -12%, #62744866, transparent 58%),
    repeating-linear-gradient(92deg, #ffffff02 0 1px, transparent 1px 4px), #103b2d;
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
  -webkit-font-smoothing: antialiased;
}
:root .app .screen.home::before,
:root .app .screen.lobby-screen::before {
  content: ''; position: absolute; z-index: -1; inset: 12px;
  border: 1px solid #bdc8a32c; border-radius: 3px; pointer-events: none;
}
:root .app .screen.home::after,
:root .app .screen.lobby-screen::after {
  content: ''; position: absolute; inset: 0 0 auto; height: 5px;
  background: linear-gradient(90deg, #947044, #e1bc86 48%, #a57e4e);
}
:root .app .screen.home *, :root .app .screen.lobby-screen * { box-sizing: border-box; }
:root .app .screen.home header, :root .app .screen.lobby-screen header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
:root .app .screen.home header small, :root .app .screen.lobby-screen header small { color: var(--wood); font-size: 10px; font-weight: 700; letter-spacing: .19em; }
:root .app .screen.home h2, :root .app .screen.lobby-screen h2 { font-size: 24px; line-height: 1.4; letter-spacing: .03em; margin: 9px 0 0; }
:root .app .screen.home h2 span { color: var(--wood); }
:root .app .screen.home .field { display: block; font-size: 12px; font-weight: 600; letter-spacing: .06em; }
:root .app .screen.home input {
  display: block; width: 100%; height: 56px; margin-top: 12px; padding: 0 16px;
  background: #082c2266; color: var(--paper); border: 1px solid #b5c5af66; border-radius: 3px;
  font: inherit; font-size: 17px; letter-spacing: .02em; appearance: none;
}
:root .app .screen.home input::placeholder { color: #a6b4a3; opacity: 1; }
:root .app .screen.home .btn, :root .app .screen.lobby-screen .btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 16px;
  border: 1px solid #c2cfb54d; border-radius: 3px; background: #0c302680;
  color: var(--paper); font: inherit; font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: background .18s cubic-bezier(.7,.01,.23,1), transform .18s cubic-bezier(.7,.01,.23,1);
}
:root .app .screen.home .btn:hover, :root .app .screen.lobby-screen .btn:hover { background: #285340; }
:root .app .screen.home .btn:active, :root .app .screen.lobby-screen .btn:active { transform: translateY(1px); }
:root .app .screen.home .btn.primary, :root .app .screen.lobby-screen .btn.primary { background: var(--wood); border-color: var(--wood); color: #243329; min-height: 56px; font-size: 15px; }
:root .app .screen.home .btn.primary:hover, :root .app .screen.lobby-screen .btn.primary:hover { background: #e6c492; }
:root .app .screen.home .wide, :root .app .screen.lobby-screen .wide { width: 100%; }
:root .app .screen.home :focus-visible, :root .app .screen.lobby-screen :focus-visible { outline: 3px solid #f3e1b3; outline-offset: 4px; }
:root .app .screen.home .foot { margin: auto 0 0; padding-top: 24px; text-align: center; color: var(--muted); font-size: 10px; line-height: 1.9; letter-spacing: .06em; }
/* A single oversized playing card. Its corner marks are CSS, not new DOM. */
:root .app .screen.home:not(.entry) header { margin-bottom: 258px; }
:root .app .screen.home:not(.entry) header::before {
  content: 'A\A♠'; white-space: pre; position: absolute; top: 158px; left: calc(50% - 80px); width: 160px; height: 218px;
  padding: 14px; border-radius: 7px; background: var(--paper); color: var(--ink);
  font-family: Georgia, serif; font-size: 28px; line-height: .95; transform: rotate(-9deg);
  box-shadow: 10px 16px 0 #06271e55, inset 0 0 0 5px #e5e3d6;
}
:root .app .screen.home:not(.entry) header::after {
  content: '♠'; position: absolute; top: 208px; left: calc(50% - 45px); width: 90px;
  text-align: center; font-family: Georgia, serif; font-size: 104px; color: var(--ink); transform: rotate(-9deg);
}
:root .app .screen.home:not(.entry) > .primary { margin-top: 20px; }
:root .app .screen.home.entry header { padding-bottom: 24px; border-bottom: 1px solid #cad1b52b; }
:root .app .screen.home.entry header h2 { font-size: 19px; }
:root .app .screen.home.entry .entry-title { font-size: 29px; line-height: 1.6; letter-spacing: .03em; margin: 28px 0; }
:root .app .screen.home.entry .field + .field { margin-top: 27px; }
:root .app .screen.home .bb-pick { display: flex; justify-content: space-between; gap: 14px; margin: 18px 0 30px; }
:root .app .screen.home .bb-pick .btn {
  position: relative; flex: 0 1 88px; aspect-ratio: 1; min-height: 0; padding: 0; border-radius: 50%;
  border: 6px dashed #a9b9a282; background: #204d3c; outline: 1px solid #a9b9a244; outline-offset: 3px;
  font-size: 12px; box-shadow: inset 0 0 0 3px #103b2d, inset 0 0 0 4px #9bad944d;
}
:root .app .screen.home .bb-pick .btn.on { background: var(--paper); border-color: #b7935c; color: var(--ink); outline-color: var(--wood); box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px #b7935c; }
:root .app .screen.home .bb-pick .btn:focus-visible { outline: 3px solid #f3e1b3; outline-offset: 5px; }
:root .app .screen.home .recent { margin-top: 26px; }
:root .app .screen.home .recent > small { display: block; color: var(--muted); font-size: 10px; margin-bottom: 10px; }
:root .app .screen.home .recent .btn { justify-content: space-between; }
:root .app .screen.home .recent .btn::after { content: '↗'; color: var(--wood); font-size: 18px; }
:root .app .screen.home .err { color: #ffd6bd; font-size: 12px; }
:root .app .screen.home .err:empty { display: none; }
:root .app .screen.lobby-screen { padding-top: 28px; }
:root .app .screen.lobby-screen header h2 { font-size: 23px; }
:root .app .screen.lobby-screen header .btn { min-height: 40px; padding: 8px 12px; font-size: 11px; }
:root .app .screen.lobby-screen .meta { display: flex; justify-content: space-between; padding: 12px 0; margin-top: 14px; border-block: 1px solid #c5ceb435; color: var(--muted); font-size: 11px; }
:root .app .screen.lobby-screen .lobby-title { margin: 20px 0 16px; }
:root .app .screen.lobby-screen .eyebrow { color: var(--wood); font-size: 9px; letter-spacing: .2em; font-weight: 700; }
:root .app .screen.lobby-screen .lobby-title h3 { font-size: 23px; margin: 10px 0; letter-spacing: -.03em; }
:root .app .screen.lobby-screen .lobby-title p { color: var(--muted); font-size: 11px; margin: 0; }
:root .app .screen.lobby-screen .roster { border-top: 1px solid #c5ceb435; }
:root .app .screen.lobby-screen .person { display: flex; align-items: center; gap: 12px; min-height: 43px; border-bottom: 1px solid #c5ceb423; }
:root .app .screen.lobby-screen .num { font-size: 10px; font-variant-numeric: tabular-nums; color: var(--wood); width: 16px; }
:root .app .screen.lobby-screen .ava { width: 34px; height: 34px; object-fit: cover; border-radius: 50%; }
:root .app .screen.lobby-screen .ava.initial { display: grid; place-items: center; background: var(--c, #665d40); color: var(--paper); font-size: 14px; border: 1px solid #e2c79666; }
:root .app .screen.lobby-screen .person b { flex: 1; font-size: 13px; font-weight: 600; }
:root .app .screen.lobby-screen .person b small { color: var(--muted); margin-left: 7px; font-size: 9px; font-weight: 400; }
:root .app .screen.lobby-screen .person > small { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--paper); }
:root .app .screen.lobby-screen .emptyrow { color: #b0bfa6; }
:root .app .screen.lobby-screen .emptyrow .ava { border: 1px dashed #b3c19c66; display: grid; place-items: center; font-size: 17px; color: #a7b797; }
:root .app .screen.lobby-screen .emptyrow b { font-size: 11px; font-weight: 400; }
:root .app .screen.lobby-screen .lobby-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; padding-top: 24px; }
:root .app .screen.lobby-screen .lobby-actions .wide { grid-column: 1 / -1; }
@media (max-width: 350px) {
  :root .app .screen.home, :root .app .screen.lobby-screen { padding-inline: 22px; }
  :root .app .screen.home .bb-pick { gap: 12px; }
  :root .app .screen.lobby-screen .lobby-title h3 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  :root .app .screen.home .btn, :root .app .screen.lobby-screen .btn { transition: none; }
}
/* 組み込み時の調整 */
:root .app .screen.home:not(.entry) .entry-title{position:relative;z-index:1;margin-top:34px}
:root .app .screen.lobby-screen header{flex-wrap:nowrap;align-items:flex-start}
:root .app .screen.lobby-screen header small{white-space:nowrap}
:root .app .screen.lobby-screen header h2{font-size:22px;line-height:1.3;word-break:keep-all}
:root .app .screen.lobby-screen .hdr-btns{flex-shrink:0;gap:0}
:root .app .screen.lobby-screen .hdr-btns .exit{white-space:nowrap;min-width:0;padding:0 7px;font-size:12px;color:var(--paper)}
