@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');
:root { --paper:#f3f0e7; --ink:#193e32; --muted:#778077; --line:#d9dace; --red:#a52e29; --blue:#203d68; --green:#225337; }
* { box-sizing:border-box; }
body { margin:0; background:var(--paper); color:var(--ink); font-family:'DM Sans',sans-serif; }
a { color:inherit; text-decoration:none; }
header,footer { display:flex; justify-content:space-between; align-items:center; margin:0 6%; padding:22px 0; font-size:11px; }
header { border-bottom:1px solid var(--line); }
.brand { font:500 20px Georgia,serif; }
main { max-width:1150px; margin:auto; padding:36px 24px; }
.player-main { max-width:700px; min-height:calc(100svh - 145px); padding-top:28px; }
h1,h2,h3,p { margin:0; }
h1 { font:500 30px Georgia,serif; }
h2 { font-size:17px; font-weight:500; }
h3 { font-size:16px; font-weight:500; }
p { color:var(--muted); font-size:13px; line-height:1.6; }
.eyebrow { font-size:11px; letter-spacing:2px; text-transform:uppercase; }
[hidden] { display:none!important; }
/* Ivory, softly beveled faces; the markings carry all of the color. */
.tile { --tile-width:150px; position:relative; width:var(--tile-width); aspect-ratio:0.72; flex-shrink:0; display:flex; align-items:center; justify-content:center; border:1px solid #d7d3bd; border-radius:8%; background:radial-gradient(ellipse at 30% 15%,#fffef7 0,#f6f3e5 65%,#eae7d6 100%); box-shadow:inset 2px 2px 3px #fffefc,inset -3px -4px 5px #d9d7c5,0 5px 0 #c7c8b8,0 7px 0 #b8bcac,0 15px 25px #293c2921; }
/* AI-enhanced photographic faces on the original CSS tile shell. */
.tile-face { position:absolute; left:50%; top:50%; width:88%; aspect-ratio:69 / 94; transform:translate(-50%,-50%); border-radius:5%; background-image:url('/mahjong-reference-enhanced.png'); background-size:1295.652174% 951.063830%; background-repeat:no-repeat; mix-blend-mode:multiply; }
#my-tile { position:relative; isolation:isolate; display:flow-root; }
#my-tile .tile-set { position:absolute; z-index:-1; inset:25px 0; max-width:440px; margin:auto; display:grid; grid-template-columns:repeat(7,1fr); gap:7px; opacity:.16; overflow:hidden; mask-image:radial-gradient(ellipse,#000 40%,transparent 75%); }
#my-tile .tile-set .tile { --tile-width:100%; width:100%; margin:0; animation:none; box-shadow:0 2px 0 #c7c8b8; }
@media(prefers-reduced-motion:no-preference) {
  .tile { transition:translate 180ms ease,box-shadow 180ms ease; }
  @media(hover:hover) { .group .tile:hover { translate:0 -3px; } }
  @keyframes deal-in { from { transform:translateY(9px) rotate(-2deg); } to { transform:translateY(0) rotate(0); } }
}
.personal { text-align:center; }
.personal .tile { --tile-width:clamp(190px,32vw,255px); margin:24px auto 28px; }
.personal h1 { font-size:25px; }
.match-instruction { margin-top:8px; }
.match-section { text-align:center; margin-top:32px; padding-top:22px; border-top:1px solid var(--line); }
#match-description { color:var(--muted); }
.member-list { display:flex; gap:8px; flex-wrap:wrap; justify-content:center; margin-top:16px; }
.member { padding:8px 14px; border:1px solid var(--line); border-radius:30px; font-size:12px; overflow-wrap:anywhere; }
.tile-fan { display:flex; justify-content:center; align-items:center; padding:40px 0 45px; }
.tile-fan .tile { --tile-width:clamp(85px,19vw,135px); }
.tile-fan>.tile:first-child { transform:rotate(-12deg) translate(12px,9px); }
.tile-fan>.tile:nth-child(2) { z-index:1; transform:translateY(-10px); }
.tile-fan>.tile:last-child { transform:rotate(12deg) translate(-12px,9px); }
.join-panel { max-width:340px; margin:auto; text-align:center; }
.join-panel h1 { margin-bottom:24px; }
label { display:block; font-size:12px; margin-bottom:8px; text-align:left; }
input,select { font:inherit; width:100%; border:1px solid #bdc8b9; border-radius:5px; padding:14px; background:#faf8ef; color:var(--ink); }
button { border:0; border-radius:5px; background:var(--ink); color:white; padding:15px 20px; font:500 13px 'DM Sans',sans-serif; cursor:pointer; }
button:hover { background:#306350; }button:disabled { opacity:.5; cursor:wait; }
form>button { width:100%; margin-top:12px; }
small { display:block; color:var(--muted); font-size:10px; line-height:1.5; margin-top:13px; }
input:focus-visible,select:focus-visible,button:focus-visible,a:focus-visible { outline:3px solid #bc8b44; outline-offset:3px; }
.status { text-align:center; color:var(--red); margin-top:16px; font-size:12px; }
.status:empty { display:none; }
footer { justify-content:center; gap:10px; color:var(--ink); border-top:1px solid var(--line); font-size:13px; font-weight:600; letter-spacing:.5px; }
.footer-logo { width:48px; height:48px; mix-blend-mode:multiply; } /* drops the JPG's white background onto the paper */
.admin-title { margin-bottom:28px; }
.panel { border:1px solid var(--line); border-radius:8px; padding:24px; }
.login-panel { max-width:400px; }.login-panel h2 { margin-bottom:20px; }
.toolbar { display:flex; justify-content:space-between; gap:24px; align-items:center; }
.toolbar h2 { margin:10px 0; font-size:22px; }
.controls { display:flex; gap:10px; }.controls select { width:155px; }.controls button { white-space:nowrap; }
.section-heading { display:flex; align-items:center; justify-content:space-between; margin:24px 0; }
.quiet { background:transparent; color:var(--ink); border:1px solid var(--line); }
.groups { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.group { padding:24px 16px; border:1px solid var(--line); border-radius:8px; text-align:center; }
.group-head { display:flex; flex-direction:column; align-items:center; gap:21px; }
.group .tile { --tile-width:112px; }.group-head p { margin-top:5px; }.group .member { font-size:11px; padding:6px 10px; }.empty-group { color:var(--muted); }
@media(max-width:650px) { header,footer { margin:0 5%; padding:18px 0; }main { padding:24px 18px; }.player-main { padding-top:20px; }.personal .tile { --tile-width:clamp(185px,53vw,230px); margin-top:20px; }.toolbar { display:block; }.toolbar form { margin-top:20px; }.controls { flex-wrap:wrap; }.groups { grid-template-columns:repeat(2,1fr); gap:10px; }.group { padding:20px 10px; }.group .tile { --tile-width:95px; }.group h3 { font-size:14px; }.match-section { margin-top:24px; } }
