/* Integration additions. Shared colors/type/spacing come from tokens.css. */
.brand{text-decoration:none;min-height:2.75rem}.intro{margin-bottom:var(--space-6)}
#auth-screen label{display:block;margin-top:var(--space-4);font-size:var(--text-support)}
#auth-screen input,#auth-screen select{display:block;width:100%;min-width:0;min-height:var(--control-height);font:inherit;font-size:var(--size-base);padding:var(--space-3);margin-top:var(--space-2);border:1px solid var(--color-border-strong);border-radius:var(--radius-control);background:var(--paper);color:var(--ink)}
/* WebKit draws a native select at its own height and ignores min-height: drawn like the inputs, the arrow is two CSS gradients (no image: CSP). */
#auth-screen select{-webkit-appearance:none;appearance:none;padding-right:2.75rem;background-image:linear-gradient(45deg,transparent 50%,var(--color-text-secondary) 50%),linear-gradient(135deg,var(--color-text-secondary) 50%,transparent 50%);background-position:calc(100% - 1.375rem) 50%,calc(100% - 1rem) 50%;background-size:.375rem .375rem;background-repeat:no-repeat}
#auth-screen input:focus-visible,#auth-screen select:focus-visible,a:focus-visible{outline:3px solid var(--color-focus-ring);outline-offset:3px}
#auth-screen button{width:100%;min-height:var(--control-height);padding:var(--space-3);margin-top:var(--space-3);border:0;border-radius:var(--button-radius);background:var(--button-primary-bg);color:var(--button-label)}
#auth-screen button:hover:not(:disabled){background:var(--button-primary-hover)}
#auth-screen button:disabled{opacity:.6;cursor:wait}
#auth-screen .secondary{background:var(--paper);color:var(--ink);border:1px solid var(--color-border-strong)}
#auth-screen .secondary:hover:not(:disabled){background:var(--color-tone-05)}
#auth-screen .consent{display:flex;gap:var(--space-3);align-items:flex-start;font-size:var(--text-support);margin-block:var(--space-6)}
#auth-screen .consent input{width:20px;height:20px;min-height:0;flex-shrink:0;margin-top:var(--space-1);accent-color:var(--wine)}
.name-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-3)}
#message[data-tone="error"]:not(:empty){border-left:3px solid var(--wine);padding-left:var(--space-3)}
.footnote{text-align:center;color:var(--muted);font-size:var(--text-support);margin-top:var(--space-6)}
a{color:var(--wine);text-underline-offset:.2em}dt{font-size:var(--text-support);color:var(--muted);margin-top:var(--space-4)}dd{margin:var(--space-1) 0 0;overflow-wrap:anywhere}
.pass-line{gap:var(--space-3)}.pass-line span:last-child{text-align:right;min-width:0}
/* Informational pages share tokens without member navigation. */
body:has(>header)>main{max-width:var(--width-app);margin:auto;padding:var(--space-6)}

.brand{display:inline-flex;align-items:center;flex-shrink:0}.brand img{display:block;width:clamp(112px,32vw,140px);height:auto}
.lucide{width:24px;height:24px;flex-shrink:0;stroke-width:2}
.nav .lucide,.nav button.active .lucide{stroke-width:2}
.row-main{display:flex;align-items:center;gap:var(--space-3);min-width:0}
.row .row-copy,.row .row-label{color:var(--ink);font-size:var(--text-body)}
.row>.lucide{width:20px;height:20px;color:var(--muted)}
.icon-button{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2)}
.icon-button .lucide{width:20px;height:20px}

/* Status belongs beside the row label, never underneath it. */
.row .row-label{color:var(--ink);font-size:var(--text-body);text-align:left}
.row .row-status{margin-left:auto;flex-shrink:0}
#member button:disabled{opacity:.5;cursor:default}
.pass-line{justify-content:flex-end}

/* 2026-10 refinement of the login check (tokens.css): the card label reads as the eyebrow, not as a booking step. */
#auth-screen .card{padding:var(--space-6) var(--space-4)}
#auth-screen .card>.step{display:block;margin:0 0 var(--space-2);color:var(--color-text-accent);font-weight:600;letter-spacing:var(--tracking-eyebrow)}
#auth-screen .card>h2{margin-top:0}
#auth-screen label{font-weight:600;color:var(--color-text-primary)}
#auth-screen input,#auth-screen select{font-weight:400}
#auth-screen .consent{font-weight:400}
#auth-screen button{letter-spacing:.04em}
.footnote{letter-spacing:.04em}
/* The member's store at the right end of the header, beside the logo (member-ui.js showStore). One line: a long name
   ends with an ellipsis on screen and is read in full, with its 「ご利用店舗：」 label kept for screen readers only. */
header{gap:var(--space-3)}
.header-store{flex:0 1 auto;min-width:0;margin:0;color:var(--color-text-secondary);font-size:var(--text-support);font-weight:600;line-height:1.4;letter-spacing:.02em;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.header-store-label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
/* Login check (owner sketch, 2026-10-07). The card heading shows only when app.js names a state (確認できました, 会員情報の登録);
   the screen fills the viewport so the studio line sits at the very bottom. It is the last item of a column, not
   fixed: on a short screen, at 125% text or with the long registration form it follows the card and never covers it. */
#card-title:empty{display:none}
.app:has(>#auth-screen:not([hidden])){padding-bottom:0}
#auth-screen{display:flex;flex-direction:column;min-height:calc(100dvh - 4rem);padding-bottom:calc(var(--space-4) + env(safe-area-inset-bottom))}
#auth-screen .intro{margin-bottom:var(--space-6)}
#auth-screen .footnote{margin-top:auto;padding-top:var(--space-8)}
/* Checking, login and error (02/03/05; owner, 2026-10-07): the membership card takes the room left, its text at the top
   and its button (login or retry) at the foot of the card, near the thumb. The registration form keeps its own height. */
#auth-screen:not(:has(#registration:not([hidden]))) .card{flex:1 0 auto;display:flex;flex-direction:column;position:relative;overflow:hidden}
#auth-screen #retry-button{margin-top:auto}
/* A failed LINE start shows both: the retry button keeps its gap under the login button. */
#auth-screen #login:not([hidden])~#retry-button{margin-top:var(--space-3)}
#auth-screen #login:not([hidden]){flex:1;display:flex;flex-direction:column;position:relative;z-index:1}
#auth-screen #login-description{margin:var(--space-2) 0 var(--space-6);font-size:var(--text-body);line-height:1.9;color:var(--color-text-primary)}
#auth-screen #login-button{margin-top:auto}
#auth-screen .card>*{position:relative;z-index:1}
/* The login check as a membership card (owner's choice B of the 2026-10-07 options): a sage plate with the white THOM
   mark tops the card while LINE is checked (02), at login (03) and when the check fails (05); not on the registration
   form. The state comes from what app.js already shows: the check is running while #login-button is disabled (start()
   and enter() hold it), an error has data-tone="error", the login is offered when #login shows. No new script.
   The plate, the dots and the retry mark are aria-hidden decoration; the message keeps its role. Here the message is
   the card's status line or headline, without the guidance box (docs/100 §2, the login check exception). */
.auth-plate,.auth-dots{display:none}
#auth-screen:not(:has(#registration:not([hidden]))) .card{padding-top:var(--space-4)}
#auth-screen:not(:has(#registration:not([hidden]))) .auth-plate{position:relative;display:flex;flex-direction:column;justify-content:flex-end;aspect-ratio:1.7/1;margin:0 0 var(--space-6);padding:2.75rem 1.25rem var(--space-4);border-radius:var(--radius-lg);clip-path:inset(0 round var(--radius-lg));color:var(--color-surface-white);
  background:radial-gradient(40% 80% at 100% 0,var(--color-plate-glow) 0,transparent 75%),linear-gradient(150deg,var(--color-membership-start),var(--color-membership-end))}
/* The arc keeps to the lower right, under the mark, never behind MEMBERSHIP at the top left. The plate clips it with
   clip-path, not overflow:hidden, so the plate still grows with its content (larger text) instead of pushing the
   mark up over the label. */
.auth-plate::after{content:"";position:absolute;width:9rem;height:12rem;border:1.25rem solid var(--color-surface-white);border-radius:6rem 6rem 0 0;right:-3rem;bottom:-7rem;transform:rotate(-25deg);opacity:.08}
/* A narrow or flattened plate has no room for it clear of the label: no arc there. */
@media (max-width:360px),(max-height:700px){.auth-plate::after{content:none}}
/* The THOM mark and PILATES STUDIO as the launch splash sets them (splash.css, #118): the image moves left by 4.76% of its
   width so the letters T–M, not the image, sit on the lockup's centre, and PILATES STUDIO is centred under them, its
   size a share of the mark's width (it scales with the mark, not with the text size). */
.auth-plate{container-type:inline-size}
.plate-mark{--mark-w:min(52cqw,176px);display:flex;flex-direction:column;align-items:center;align-self:flex-start;width:var(--mark-w)}
.plate-mark img{width:100%;height:auto;filter:invert(1);translate:-4.76% 0;opacity:.96}
.plate-mark small{margin:.375rem -.34em 0 0;font:300 calc(var(--mark-w)*.075)/1 "Helvetica Neue",Roboto,Arial,sans-serif;letter-spacing:.34em;white-space:nowrap;opacity:.9}
.auth-plate-retry{display:none;position:absolute;right:1rem;bottom:1rem;box-sizing:content-box;width:1.25rem;height:1.25rem;padding:.5rem;border-radius:50%;background:rgba(255,255,255,.16)}
/* MEMBERSHIP sits on the plate, white (5.0:1 on sage, 4.8:1 on taupe), away from the plate's lighter corner; the plate's
   top padding (rem) keeps the mark below it at any text size. */
#auth-screen:not(:has(#registration:not([hidden]))) .card>.step{position:absolute;top:calc(var(--space-4) + 1rem);left:calc(var(--space-4) + 1.25rem);z-index:2;margin:0;color:var(--color-surface-white);font-size:var(--size-small)}
/* Short screens (an iPhone SE inside LINE): a flatter plate keeps the button near the first view. */
@media (max-height:700px){#auth-screen:not(:has(#registration:not([hidden]))) .auth-plate{aspect-ratio:2.4/1}.auth-plate .plate-mark{--mark-w:min(40cqw,176px)}}
/* An iPhone SE inside LINE (about 500px of height): a plate strip and tighter spacing keep the login button in the first view. */
@media (max-height:560px){#auth-screen{padding-top:var(--space-4)}#auth-screen .intro{margin-bottom:var(--space-4)}
#auth-screen:not(:has(#registration:not([hidden]))) .card{padding-top:var(--space-3)}
#auth-screen:not(:has(#registration:not([hidden]))) .auth-plate{aspect-ratio:3.4/1;margin-bottom:var(--space-4);padding:2.25rem 1.25rem var(--space-3)}
.auth-plate .plate-mark{--mark-w:30cqw}.auth-plate small{display:none}
#auth-screen:not(:has(#registration:not([hidden]))) .card>.step{top:calc(var(--space-3) + .75rem)}}
/* A failed check on a short screen: the plate is a strip, so the button stays in the first view. */
@media (max-height:700px){#auth-screen:not(:has(#registration:not([hidden]))):has(#message[data-tone="error"]:not(:empty)) .auth-plate{aspect-ratio:3.4/1;margin-bottom:var(--space-4);padding:2.25rem 1.25rem var(--space-3)}
#auth-screen:not(:has(#registration:not([hidden]))):has(#message[data-tone="error"]:not(:empty)) .auth-plate .plate-mark{--mark-w:30cqw}#auth-screen:not(:has(#registration:not([hidden]))):has(#message[data-tone="error"]:not(:empty)) .auth-plate small{display:none}
#auth-screen:not(:has(#registration:not([hidden]))):has(#message[data-tone="error"]:not(:empty)) .card>.step{top:calc(var(--space-4) + .75rem)}}
#auth-screen:not(:has(#registration:not([hidden]))) #message[data-tone="info"]:not(:empty){display:block;padding:0;background:none;border:0;border-radius:0;text-align:left}
#auth-screen:not(:has(#registration:not([hidden]))) #message[data-tone="info"]:not(:empty)::before{content:none}
/* 02 checking: the mark breathes and three dots lead the status line. Only transform and opacity move (the compositor's
   work: no layout or repaint per frame), and both start 0.3s late, so a check that ends at once never flashes them. */
#auth-screen:not(:has(#registration:not([hidden]))):not(:has(#message[data-tone="error"])):has(#login-button:disabled) .auth-plate img{animation:auth-breathe 2.4s ease-in-out .3s infinite;transform-origin:54.76% 50%;will-change:transform,opacity}
#auth-screen:not(:has(#registration:not([hidden]))):not(:has(#message[data-tone="error"])):has(#login-button:disabled) .auth-dots{display:inline-flex;flex-shrink:0;gap:.5rem;animation:auth-appear .2s ease-out .3s both}
/* While the check runs (owner, 2026-10-07: option C's dots under the B plate): the three dots centred, the status line
   centred under them, both in the middle of the room left under the plate. Only the first check (02): right after the login button is pressed
   its text and button stay where they are. Other states keep their left-aligned text. */
#auth-screen:not(:has(#registration:not([hidden]))):not(:has(#message[data-tone="error"])):has(#login-button:disabled):not(:has(#login:not([hidden]))) .auth-status{flex:1 0 auto;flex-direction:column;justify-content:center;gap:var(--space-4);padding-bottom:var(--space-8)}
#auth-screen:not(:has(#registration:not([hidden]))):not(:has(#message[data-tone="error"])):has(#login-button:disabled):not(:has(#login:not([hidden]))) .auth-status>#message{flex:0 0 auto;text-align:center;word-break:auto-phrase;text-wrap:pretty}
.auth-status{display:flex;align-items:center;gap:.75rem}
.auth-status>#message{flex:1;min-width:0;margin:0}
.auth-dots>i{width:.5rem;height:.5rem;border-radius:50%;background:var(--wine)}
.auth-dots>i:nth-child(2){background:var(--brand-sage)}
.auth-dots>i:nth-child(3){background:var(--ink)}
/* The dots move only while the check runs (nothing keeps animating behind the registration form); backwards: each dot
   waits at its first frame (faint) until its turn. */
#auth-screen:not(:has(#registration:not([hidden]))):not(:has(#message[data-tone="error"])):has(#login-button:disabled) .auth-dots>i{animation:auth-dot 1.2s ease-in-out .3s infinite backwards}
#auth-screen:not(:has(#registration:not([hidden]))):not(:has(#message[data-tone="error"])):has(#login-button:disabled) .auth-dots>i:nth-child(2){animation-delay:.45s}
#auth-screen:not(:has(#registration:not([hidden]))):not(:has(#message[data-tone="error"])):has(#login-button:disabled) .auth-dots>i:nth-child(3){animation-delay:.6s}
#auth-screen:not(:has(#registration:not([hidden]))):not(:has(#message[data-tone="error"])):has(#login-button:disabled) #message[data-tone="info"]:not(:empty){font-size:var(--text-body);font-weight:400;color:var(--color-text-secondary)}
#auth-screen:not(:has(#registration:not([hidden]))):not(:has(#login:not([hidden]))) #message[data-tone="info"]:not(:empty){font-size:var(--text-body);color:var(--color-text-secondary)}
@keyframes auth-breathe{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(.985)}}
@keyframes auth-dot{0%,80%,100%{opacity:.25;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
@keyframes auth-appear{from{opacity:0}to{opacity:1}}
/* Reduced motion wins over every state rule above (they are more specific), so the mark and the dots stand still. */
@media (prefers-reduced-motion:reduce){.auth-plate img,.auth-dots,.auth-dots>i{animation:none!important}}
/* 03 login: 「THOMへようこそ。」 looks like the card's headline (still read as a status), the line under it, the button at
   the foot. Not while the check runs, and not in the connection check, whose card has its own heading. */
#auth-screen:has(#login:not([hidden])):not(:has(#login-button:disabled)):has(#card-title:empty) #message[data-tone="info"]:not(:empty){margin-bottom:var(--space-2);font-size:clamp(1.0625rem,5.2vw,1.25rem);font-weight:600;line-height:1.6;color:var(--ink);letter-spacing:var(--tracking-heading)}
#auth-screen:has(#login:not([hidden])) #login-description{margin-top:0;color:var(--color-text-secondary);word-break:auto-phrase;text-wrap:pretty}
/* 05 error: the plate goes quiet (taupe) with a retry mark; the message is body text and retry the one primary action. */
#auth-screen:not(:has(#registration:not([hidden]))):has(#message[data-tone="error"]:not(:empty)) .auth-plate{background:linear-gradient(150deg,var(--color-plate-error-start),var(--color-plate-error-end))}
#auth-screen:not(:has(#registration:not([hidden]))):has(#message[data-tone="error"]:not(:empty)) .auth-plate img{opacity:.5}
#auth-screen:not(:has(#registration:not([hidden]))):has(#message[data-tone="error"]:not(:empty)):has(#retry-button:not([hidden])) .auth-plate-retry{display:block}
#auth-screen:not(:has(#registration:not([hidden]))) #message[data-tone="error"]:not(:empty){border:0;padding:0;font-size:var(--text-body);line-height:1.8;color:var(--ink)}
#auth-screen #retry-button.secondary{background:var(--button-primary-bg);color:var(--button-label);border:0}
#auth-screen #retry-button.secondary:hover:not(:disabled){background:var(--button-primary-hover)}
/* The language switcher (docs/112 §3.3; owner, 2026-10-09) at the right end of the header, after the member's store (on
   the sign-in and registration screens, alone after the logo). Its look is locale-menu.css. The store's name takes the
   room left and ends with an ellipsis; the switcher is never cut. The announcement after a change is read, not shown. */
.header-store{margin-left:auto}
.header-locale{flex-shrink:0;margin-left:auto}.header-locale[hidden],.header-locale:empty{display:none}
.header-store:not([hidden])+.header-locale{margin-left:calc(var(--space-1) - var(--space-3))}
/* On a phone (under 400px) the store's name may take two lines beside the switcher, so a short name stays readable at
   320px; a longer one still ends with an ellipsis on the second line (#173 kept one line before the switcher came). */
@media(max-width:399px){.header-store:not([hidden]){display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;line-height:1.3;font-size:.8125rem}}
.locale-status{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
/* A Japanese name (store, instructor) inside an English or Chinese page keeps the Japanese glyphs (docs/112 §3.7). */
span[lang="ja"]{font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Noto Sans JP",sans-serif}
