/* Remi di Teras. Controls stay live; the illustration contains no interface text. */
@font-face{font-family:Teras;src:url('assets/kalam-bold.ttf') format('truetype');font-style:normal;font-weight:700;font-display:swap}
:root{color-scheme:light;--paper:#e8ce9e;--surface:#f4e2b9;--ink:#213e2e;--muted:#5a6147;--line:#876c4345;--felt:#31573a;--deep:#173928;--gold:#f0d29a;--teras-font:Teras,'Trebuchet MS',sans-serif;--paper-texture:repeating-linear-gradient(13deg,#7d522409 0 1px,transparent 1px 5px);--rug:linear-gradient(#172e2420,#172e2420),url('assets/teras-rug.webp') center/480px 480px}
body{background:#303d2b;color:var(--ink)}
#remi-app{background:linear-gradient(#183728a8,#253628bf),url('assets/teras-porch.webp') center/cover fixed;max-width:1360px;color:var(--ink)}
#remi-app button:not(.hand-card):not(.table-card){-webkit-tap-highlight-color:transparent}
#remi-app .club-icon{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.club-icon-defs{position:absolute;width:0;height:0;overflow:hidden}
#remi-app .primary{background:linear-gradient(#ffffff08,#00000012),#31573a;color:#fff1ce;border-color:#1e3e2a;box-shadow:0 3px 0 #122b1e65;font-weight:700}
#remi-app input,#remi-app select{background:#fbefce;border-color:#92794c70;color:var(--ink);color-scheme:light;border-radius:6px}
#remi-app button:focus-visible,#remi-app a:focus-visible{outline:3px solid #c25c32;outline-offset:4px}
#remi-app a{color:#31573a}
#remi-app>.view:not(#home-view):not(#game-view):not(#spectator-view){max-width:1000px;margin:0 auto 20px;background:var(--paper-texture),#eddbb6;border:1px solid #e4c28c;box-shadow:0 6px 20px #15241840;border-radius:6px 11px 5px 9px;min-height:calc(100svh - 120px)}
#remi-app .padded{padding:22px}
#remi-app h1,#remi-app h2,#remi-app .brand b{font-family:var(--teras-font);font-weight:700}
#remi-app footer{background:#142c20e6;color:#ded0aa;border-color:#e2c18c30;font-size:10px}
#remi-app footer a{color:#edcc91}
#remi-app>.teras-header,#remi-app.browsing-rooms>.teras-header{display:flex;align-items:center;justify-content:space-between;gap:12px;background:transparent;padding:10px 18px;border:0;color:#fff0c8;flex-wrap:nowrap;min-height:68px}
#remi-app .teras-header>button{border:0;background:#244530;color:#fff0c8;min-width:44px;height:44px;border-radius:50%;padding:6px;font-size:25px;box-shadow:0 3px 0 #0e281b80}
#remi-app .teras-header>.brand{display:flex;align-items:center;justify-content:center;gap:9px;border:0;border-radius:0;background:none;box-shadow:none;height:auto;min-width:0;text-align:left;padding:0;color:#fff0c8}
#remi-app .brand b{font-size:23px;line-height:1.1}#remi-app .brand small{display:block;font:11px/1.2 'Segoe UI',sans-serif;letter-spacing:.2px;color:#eadbb5}
#remi-app.at-home>.app-header,#remi-app.at-home>footer,#remi-app.in-game>.app-header,#remi-app.in-game.menu-open>.app-header,#remi-app.watching>.app-header{display:none}
#remi-app .club-home{position:relative;isolation:isolate;overflow:hidden;min-height:100svh;padding:0;max-width:620px;margin:auto;background:#655d3c}
#remi-app.at-home{background:linear-gradient(#18372877,#18372877),url('assets/teras-porch.webp') center/cover fixed}
#remi-app .teras-scene{position:absolute;inset:0;z-index:-1;overflow:hidden;pointer-events:none}
#remi-app .teras-scene-art{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:100%;aspect-ratio:864/1821}
#remi-app .teras-scene-art>img{display:block;width:100%;height:100%;object-fit:fill}
#remi-app .club-home-shell{position:relative;display:flex;flex-direction:column;min-height:max(770px,calc(100svh - 38px));padding:18px 22px 13px;width:100%;margin:auto}
#remi-app .teras-hud{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 10px;align-items:center;z-index:1}
#remi-app .kl-profile{display:flex;align-items:center;min-width:0;gap:7px;padding:0;border:0;background:none;text-align:left;box-shadow:none}
#remi-app .kl-avatar{display:grid;place-items:center;width:48px;height:48px;flex-shrink:0;border-radius:50%;border:2px solid #e4bc79;background:#f5e5bd;color:#294a32;font:700 25px/1 var(--teras-font);box-shadow:0 3px 5px #17281950}
#remi-app .teras-profile-label{display:block;min-width:0;background:var(--paper-texture),#f2dfb3;padding:6px 8px 4px;transform:rotate(-1deg);border-radius:3px 6px 2px 5px;box-shadow:0 3px 4px #142a2340}
#remi-app #club-profile-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;font:700 16px/1.2 var(--teras-font);color:#24452f}
#remi-app #club-profile-note{display:none}
#remi-app .teras-hud>.online-count{grid-column:1;padding:3px 0 0 58px;color:#fff6d8;font-size:10px;text-shadow:0 1px 3px #172819;background:transparent}
#remi-app .teras-hud-tools{display:flex;gap:6px}
#remi-app .teras-hud-tools button{display:grid;place-items:center;padding:8px;width:40px;height:40px;min-height:40px;border-radius:50%;background:#31583d;color:#fff0c8;border:1px solid #96a075;box-shadow:0 3px 5px #17281980}
#remi-app [data-sound-toggle][aria-pressed=false]{opacity:.65;position:relative}
#remi-app [data-sound-toggle][aria-pressed=false]:after{content:'';position:absolute;inset:19px 6px auto;height:2px;transform:rotate(-45deg);background:#ffdbb0}
#remi-app .teras-title{text-align:center;margin:36px -5px 0;filter:drop-shadow(0 3px 2px #10261960)}
#remi-app .teras-title h1{font:700 clamp(46px,12vw,74px)/1.08 var(--teras-font);letter-spacing:-1.5px;color:#fff0c9;transform:rotate(-3deg);text-shadow:3px 3px #244732,-3px -3px #244732,6px 1px #244732,-6px 1px #244732,0 7px #244732}
#remi-app .teras-title-suit{display:block;font:30px/1 Georgia,serif;color:#f3db9d;margin:-5px 0 4px}
#remi-app .teras-title>small,#remi-app .teras-title>p{display:table;margin:7px auto 0;padding:3px 12px 0;background:var(--paper-texture),#f2dfb3;color:#27462f;font:700 13px/1.5 var(--teras-font);border-radius:2px 6px 3px 4px;transform:rotate(-1deg)}
#remi-app .teras-title>p{font-size:20px;margin-top:10px;transform:rotate(1deg)}
#remi-app .teras-play-area{margin-top:auto;padding-top:90px}
#remi-app .teras-modes{display:grid;grid-template-columns:1fr 1.2fr 1fr;align-items:center;gap:6px;margin-bottom:20px}
#remi-app .teras-mode{display:flex;align-items:center;flex-direction:column;justify-content:center;gap:3px;min-height:92px;padding:10px 5px 7px;background:var(--paper-texture),#f0deb3;color:#29472f;border:0;border-radius:4px 8px 3px 6px;box-shadow:1px 4px 4px #17302260;transform:rotate(-4deg);font:700 16px/1.1 var(--teras-font)}
#remi-app .teras-mode:last-child{transform:rotate(4deg)}
#remi-app .teras-mode>.club-icon{width:40px;height:40px;stroke-width:1.5}
#remi-app .teras-mode small{font:700 10px/1.5 var(--teras-font)}
#remi-app .teras-menu-cards{height:118px;position:relative;isolation:isolate}
#remi-app .teras-menu-cards .deck-card{position:absolute;width:64px;height:94px;bottom:7px;left:calc(50% - 32px);border-radius:4px;box-shadow:0 4px 6px #1c302866;transform:rotate(-20deg) translateX(-20px);transform-origin:50% 110%}
#remi-app .teras-menu-cards .deck-card:nth-child(2){transform:translateY(-7px);z-index:2}
#remi-app .teras-menu-cards .deck-card:nth-child(3){transform:rotate(20deg) translateX(20px);z-index:3}
#remi-app .teras-menu-cards .corner{font-size:18px;left:4px;top:4px;line-height:1}.teras-menu-cards .corner small{font-size:14px}
#remi-app .teras-menu-cards .corner.bottom{top:auto;left:auto;bottom:4px;right:4px;font-size:14px}
#remi-app .teras-menu-cards .art{width:65%;left:30%;top:54%}
#remi-app .teras-center-suit{position:absolute;left:30%;top:36%;font:38px/1 Georgia,serif}
#remi-app .kl-main-action{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;min-height:90px;padding:13px 12px 7px;transform:rotate(-1deg);border:2px solid #bd985a;border-radius:10px 6px 12px 5px;background:linear-gradient(9deg,#ffffff08,transparent),#31583c;color:#fff0c9;box-shadow:1px 5px 0 #9f7442,3px 8px 10px #38281750;font-family:var(--teras-font)}
#remi-app .kl-main-action strong{font-size:clamp(31px,8.5vw,46px);line-height:1.12;font-weight:700;letter-spacing:1px}
#remi-app .kl-main-action small{font-size:18px;line-height:1.4}
#remi-app .teras-secondary{display:flex;justify-content:center;gap:16px;margin:22px 12px 0;min-height:50px}
#remi-app .teras-secondary button{display:flex;align-items:center;justify-content:center;gap:7px;background:var(--paper-texture),#f3dfb1;color:#2b4930;border:0;padding:9px 10px 5px;font:700 16px/1.2 var(--teras-font);border-radius:4px 7px 4px 6px;box-shadow:0 3px 4px #271e1644;max-width:52%;transform:rotate(-2deg)}
#remi-app .teras-secondary button:last-child{transform:rotate(2deg)}
#remi-app .teras-secondary button>.club-icon{width:27px;height:27px}
#remi-app .teras-dock{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:34px;padding:0 0 6px;background:none}
#remi-app .teras-dock button{display:flex;flex-direction:column;align-items:center;gap:7px;background:none;padding:0;border:0;box-shadow:none;color:#294830;font:700 15px/1.2 var(--teras-font)}
#remi-app .teras-dock .club-icon{width:48px;height:48px;padding:6px;background:#f2dfb3;border-radius:6px;box-shadow:0 3px 3px #35271d66;transform:rotate(-6deg)}
#remi-app .teras-dock button:nth-child(2) .club-icon{transform:rotate(5deg)}
#remi-app .teras-dock button>span{padding:4px 7px 2px;background:var(--paper-texture),#f2dfb3;border-radius:4px 3px 5px 2px;box-shadow:0 2px 3px #35271d55}
#remi-app .club-apk{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:9px;margin:0;padding:7px;background:#142c20cf;min-height:38px;color:#efdfb8}
#remi-app .club-apk a{min-height:0;padding:0;border:0;background:none;color:#f0d5a0;font:11px/1.5 'Segoe UI',sans-serif;box-shadow:none}
#remi-app .club-apk small{font-size:9px;color:#ead4af}
/* Ambient motion is restrained, composited, and disabled when hidden or reduced. */
.street-glow{position:absolute;left:87.5%;top:22%;width:12%;height:8%;border-radius:50%;background:radial-gradient(ellipse,#ffd58088,#ffc05c26 30%,transparent 70%);mix-blend-mode:screen;animation:teras-lamp 10s ease-in-out infinite;pointer-events:none}
.smoke{position:absolute;pointer-events:none;overflow:visible;fill:none;stroke:#fff6e3;stroke-linecap:round;filter:blur(1.6px)}
.smoke path{animation:teras-smoke 7s ease-out infinite;transform-origin:50% 100%;stroke-width:2;opacity:0}
.cigarette-smoke{left:8%;top:65%;width:7%;height:12%}.cigarette-smoke path:nth-child(2){animation-delay:-3.5s;animation-duration:9s;stroke-width:1.4}
.coffee-steam{left:24%;top:34%;width:12%;height:7%;filter:blur(1.3px)}.coffee-steam path{animation-name:teras-steam;animation-duration:5.5s;stroke-width:1.8}.coffee-steam path:nth-child(2){animation-delay:-2s}.coffee-steam path:nth-child(3){animation-delay:-3.6s}
@keyframes teras-lamp{0%,70%,100%{opacity:.72}75%{opacity:.42}80%{opacity:.65}88%{opacity:.5}94%{opacity:.72}}
@keyframes teras-smoke{0%{opacity:0;transform:translate(0,12px) scale(.75, .8)}25%{opacity:.3}60%{opacity:.17}100%{opacity:0;transform:translate(13px,-24px) scale(1.3,1.15)}}
@keyframes teras-steam{0%{opacity:0;transform:translateY(7px) scale(.8)}30%{opacity:.26}65%{opacity:.16}100%{opacity:0;transform:translate(3px,-13px) scale(1.1)}}
.teras-motion-paused .smoke path,.teras-motion-paused .street-glow{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){.smoke path,.street-glow{animation:none!important}.smoke path{opacity:.12}.street-glow{opacity:.6}}
/* Paper sheets and cardboard replace the previous dashboard panels. */
#remi-app .setup-layout{max-width:880px;margin:auto;padding:26px;min-height:0;gap:28px}
#remi-app .club-setup-intro>.club-icon{width:64px;height:64px;margin-bottom:8px;color:#31573a}
#remi-app .intro h1{font:700 36px/1.2 var(--teras-font);margin:12px 0}
#remi-app .intro p{font-size:13px;line-height:1.6;color:#5a6147}
#remi-app .setup-card{background:var(--paper-texture),#f8e8c5;border:1px solid #a68c5455;border-radius:4px 9px 4px 8px;box-shadow:2px 5px 0 #a58b4933;gap:13px;padding:23px}
#remi-app .setup-card h2{font:700 26px var(--teras-font)}
#remi-app .room-browser-heading h1,#remi-app #history-view h1,#remi-app #competition-view h1{font:700 30px var(--teras-font);color:#29492f}
#remi-app .room-browser-actions button{font-family:var(--teras-font);font-size:16px;border-radius:4px 7px 3px 5px;box-shadow:0 3px 0 #7d693422}
#remi-app .public-rooms{background:transparent;padding:0;border:0;box-shadow:none}
#remi-app .public-rooms-heading{background:transparent;border:0;padding-bottom:8px}
#remi-app #public-room-list{display:grid;gap:12px}
#remi-app .public-room{display:grid;grid-template-columns:82px minmax(0,1fr) auto;gap:13px;align-items:center;background:var(--paper-texture),#f6e5bf;border:1px solid #96764140;border-radius:4px 8px 3px 7px;box-shadow:1px 4px 0 #b39a6740;padding:17px 12px}
#remi-app .public-room-main{min-width:0}#remi-app .public-room-title{display:flex;flex-wrap:wrap;gap:6px;align-items:flex-start}
#remi-app .public-room-title strong{font:700 17px/1.2 var(--teras-font);color:#29472f}
#remi-app .public-room small{font-size:10px;color:#616044;display:flex;gap:3px 8px;flex-wrap:wrap;margin-top:6px}
#remi-app .room-phase{background:#31583c16;color:#31503a;border:1px solid #31583c30;font-size:9px}
#remi-app .room-phase-playing{background:#b67b2b20;color:#6e421e;border-color:#b67b2b50}
#remi-app .room-phase-finished{color:#6c6757;background:#73624215}
#remi-app .public-room-actions{display:grid;gap:6px}
#remi-app .public-room-actions button{min-height:40px;padding:8px 12px;background:#31573a;color:#fff0cc;border:0;font:700 15px var(--teras-font);box-shadow:0 2px 0 #153526;border-radius:4px 6px 3px 5px}
#remi-app .public-room-actions button[data-watch-room]{background:#e7cea0;color:#2b4931;box-shadow:0 2px 0 #b59660}
#remi-app .club-room-table{position:relative;width:64px;height:43px;margin:9px 7px;border-radius:3px;transform:rotate(-4deg);background:repeating-linear-gradient(0deg,transparent 0 12px,#9f723e22 12px 13px),#c79a61;border:2px solid #b58a52;box-shadow:0 3px 0 #8d683a;display:grid;place-items:center;color:#76553380;font-size:22px}
#remi-app .club-seat{position:absolute;left:var(--seat-left);top:var(--seat-top);transform:translate(-50%,-50%);width:19px;height:19px;border-radius:50%;display:grid;place-items:center;background:#31573a;color:#ffedc7;border:1px solid #a7aa79;font:700 10px/1 Arial,sans-serif}
#remi-app .club-seat.empty{background:#f8e7c1;color:#8c784f;border:1px dashed #92743f}
#remi-app .room-panel{background:var(--paper-texture),#f8e8c5;border-color:var(--line);box-shadow:1px 4px 0 #b39a6730;border-radius:5px}
#remi-app .room-member{border-color:var(--line)}
#remi-app .room-ai-offer{background:#e8cd98;color:#3d4e32;border-color:#b79250}
#remi-app .competition-empty{background:var(--paper-texture),#f7e6bf;border:1px dashed #ae8b51;box-shadow:none;border-radius:8px}
#remi-app .competition-empty h2{color:#315139;font:700 26px var(--teras-font)}
#remi-app .competition-emblem{background:#dfc590;border:0;border-radius:7px;box-shadow:3px 4px 0 #bba06c60;color:#365337;transform:rotate(-4deg)}
#remi-app .competition-emblem .club-icon{width:52px;height:52px}
#remi-app .competition-soon{background:#31573a;color:#fff0cc;border:0}
#remi-app .competition-empty p{color:#616347}
#remi-app dialog{background:var(--paper-texture),#f2dfb7;color:#29472f;border:1px solid #f8e8c4;border-radius:7px 13px 6px 10px;box-shadow:3px 5px 0 #ad8954,0 20px 80px #0f2419b3}
#remi-app dialog::backdrop{background:#132b20b0;backdrop-filter:blur(3px)}
#remi-app dialog h2{font:700 27px/1.25 var(--teras-font);color:#29472f}
#remi-app dialog p,#remi-app dialog small{color:#565e43}
#remi-app .utility-heading button,#remi-app .account-heading button,#remi-app .points-heading button{background:#31583c;color:#ffedc7;border:0;border-radius:50%}
#remi-app .navigation-dialog{width:min(400px,calc(100vw - 28px));max-height:calc(100dvh - 32px);padding:22px}
#remi-app #mobile-menu-close{display:block;position:static;min-width:38px;height:38px;min-height:38px}
#remi-app .teras-navigation{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:18px}
#remi-app .teras-navigation button{display:flex;align-items:center;gap:9px;min-width:0;white-space:normal;min-height:56px;text-align:left;background:#fff0cd;border:1px solid #b39a6750;border-radius:4px 7px 4px 5px;color:#2d4c35;font:700 16px/1.25 var(--teras-font);padding:10px;box-shadow:0 3px 0 #b19a6722}
#remi-app .teras-navigation button.active{background:#31573a;color:#fff0c9}
#remi-app .teras-navigation button>span{min-width:0;overflow-wrap:anywhere}
#remi-app .header-leave{margin-top:18px;width:100%;background:#efe0bb;border-color:#aa785b;color:#82452d}
#remi-app .result-person,#remi-app .score-row,#remi-app .points-player{background:#fff4d020;border-color:var(--line)}
#remi-app .result-person b{font:700 29px var(--teras-font);color:#2e593c}
#remi-app .statistics-list>div,#remi-app .account-person{background:#fff1cd70;border-color:var(--line)}
#remi-app .statistics-tabs button[aria-pressed=true]{background:#31573a;color:#fff0c9}
#remi-app .session-results{border-color:var(--line);color:#29472f}
#remi-app .coffee-voluntary{display:inline-block;margin:13px 0;padding:5px 10px;border:1px solid #a58b5050;border-radius:20px;background:#d8bc831f;font-size:11px}
#remi-app .coffee-image-link{display:block;max-width:330px;margin:0 auto 12px;background:#fff;border-radius:5px;overflow:hidden}
#remi-app .coffee-image-link img{display:block;width:100%;height:auto;background:#fff;filter:none}
#remi-app .coffee-payee{text-align:center;font-size:12px;margin:8px 0}
#remi-app .coffee-actions{display:grid;gap:10px;margin-top:16px}
#remi-app .coffee-actions a{padding:12px;text-decoration:none;text-align:center;border-radius:5px}
#remi-app #club-invite-code{font:700 29px var(--teras-font);letter-spacing:3px;margin:14px 0;user-select:all}
/* Playing surface: a worn cardboard center on a woven rug; card sizing is unchanged. */
#remi-app.in-game,#remi-app.watching{background:var(--rug);color:#fff0cf}
#remi-app .table-wrap{background:transparent;border:0;color:#fff0cf}
#remi-app .table-surface,#remi-app #watch-surface,#remi-app.in-game.mobile-landscape .table-surface{background:linear-gradient(90deg,transparent 49.6%,#996c3820 50%,transparent 50.4%),repeating-linear-gradient(0deg,#6f451209 0 1px,transparent 1px 7px),#c5a16f;border:1px solid #e0bd83;border-radius:6px 11px 5px 9px;box-shadow:inset 0 0 30px #7d542218,0 3px 0 #72533355;color:#263d2c}
#remi-app .meld-title,#remi-app .meld-owner,#remi-app .meld-inspect,#remi-app .meld-header,#remi-app .table-suit,#remi-app .meld-count{color:#28452e}
#remi-app .meld-inspect{background:transparent}
#remi-app .meld-title small,#remi-app .meld-owner{color:#4f5136}
#remi-app .meld.focused{background:#fff0c224;box-shadow:inset 0 0 0 1px #42694480}
#remi-app .table-history{border-color:#80633c55;color:#2c442f}
#remi-app #toggle-history,#remi-app #watch-history{color:#29472f}
#remi-app #activity li,#remi-app #watch-activity li{color:#36452e;border-color:#85663e33}
#remi-app .opening-packet,#remi-app .opening-packet.ready{background:#f7e6bc24;border-color:#8d6c3c55;color:#29472f}
#remi-app .opening-packet small,#remi-app .opening-packet strong{color:#29472f}
#remi-app .opponent{background:#16392865;border-color:#e2c18c30;border-radius:5px}
#remi-app .opponent.current{border-color:#efd494;background:#30583b88}
#remi-app .avatar{background:#f1dbac;color:#2c4c32;border:1px solid #efd79e;box-shadow:0 2px 4px #18342450}
#remi-app .opponent small{color:#f0dfb9}
#remi-app .hand-area{background:transparent;border-color:#eddaae40}
#remi-app .hand-toolbar button,#remi-app .claim-actions button{background:#ead7af;color:#29472f;border-color:#d3b888;border-radius:4px 6px 3px 5px;box-shadow:0 2px 0 #65472c50}
#remi-app .hand-group:not(.ungrouped){background:#24472e33;border-color:#e0c39335}
#remi-app .table-tools button,#remi-app .table-tools #show-points,#remi-app .table-tools #landscape-mode{background:#ead7af;color:#29472f;border-color:#d3b888}
#remi-app #mobile-menu-toggle{display:block;position:static;color:#fff0ca;background:#31573a;border-color:#acaa76;min-width:38px}
#remi-app .meld-detail,#remi-app.in-game.mobile-landscape.landscape-history-open .table-history{background:var(--paper-texture),#ead4a8;color:#29472f;border-color:#ab8850}
#remi-app .meld-detail p,#remi-app .meld-detail small{color:#4a573b}
#remi-app #spectator-view{background:transparent;color:#fff0cf}
#remi-app .watch-meld>header,#remi-app .watch-meld>header span,#remi-app .watch-meld>small{color:#29472f}
#remi-app #watch-history-panel{border-color:#85663e55}
#remi-app .watch-player{background:#1c402e80;border-color:#e7c68c30}
#remi-app .watch-note,#remi-app #watch-status,#remi-app .hand-message,#remi-app .table-foot{color:#fff0cf}
#remi-app .deck-gallery{background:var(--rug)}
#remi-app .native-update-settings{border-color:var(--line)}
#remi-app .native-update-dialog [data-update-note]{color:#596044}
.native-app #remi-app{background:#253e2a}
.native-app #remi-app:not(.in-game):not(.watching)>#home-view{background:#655d3c}
.native-app #remi-app.in-game,.native-app #remi-app.watching{background:var(--rug)}
@media(min-width:621px){#remi-app .club-home{box-shadow:0 0 80px #14251ba0}#remi-app>.view:not(#home-view):not(#game-view):not(#spectator-view){width:calc(100% - 36px)}#remi-app .club-home-shell{padding-left:34px;padding-right:34px}#remi-app .teras-title{margin-top:42px}}
@media(max-width:580px){#remi-app .padded{padding:18px 14px}#remi-app>.view:not(#home-view):not(#game-view):not(#spectator-view){width:calc(100% - 20px)}#remi-app .setup-layout{display:block;padding:20px 16px}#remi-app .club-setup-intro{margin-bottom:16px}#remi-app .club-setup-intro>.club-icon{float:left;width:45px;height:45px;margin:0 12px 0 0}#remi-app .intro h1{font-size:28px;margin:5px 0 10px}#remi-app .intro p{clear:both}#remi-app .setup-card{padding:18px}#remi-app .public-room{grid-template-columns:70px minmax(0,1fr) auto;gap:9px;padding:14px 9px}#remi-app .club-room-table{width:56px;height:39px}#remi-app .public-room-title{flex-direction:column}#remi-app .public-room-actions button{font-size:14px;padding:8px 10px}#remi-app .room-browser-actions button{font-size:15px}#remi-app .opponent .avatar{display:grid;width:25px;height:25px;font-size:9px}#remi-app .opponent-top{gap:4px}#remi-app .opponent b{font-size:11px}}
@media(max-width:359px){#remi-app .club-home-shell{padding:14px 15px 12px;min-height:740px}#remi-app .kl-avatar{width:39px;height:39px;font-size:23px}#remi-app #club-profile-name{font-size:14px}#remi-app .teras-hud-tools button{width:36px;height:36px;min-height:36px;padding:7px}#remi-app .teras-hud>.online-count{padding-left:47px}#remi-app .teras-title h1{font-size:47px}#remi-app .teras-title>p{font-size:18px}#remi-app .teras-mode{font-size:14px}#remi-app .teras-dock{gap:7px}#remi-app .teras-dock button{font-size:13px}#remi-app .teras-secondary button{font-size:14px;gap:4px}#remi-app .teras-menu-cards .deck-card{width:54px;height:81px;left:calc(50% - 27px)}#remi-app .public-room{grid-template-columns:58px minmax(0,1fr) auto;gap:7px}#remi-app .club-room-table{transform:scale(.85) rotate(-4deg);margin-left:0}#remi-app .teras-navigation button{font-size:14px;padding:8px}}
@media(orientation:landscape) and (max-height:600px){#remi-app .club-home{max-width:100%}#remi-app .club-home-shell{min-height:480px;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto 1fr auto;gap:10px 30px;padding:12px 30px}#remi-app .teras-hud{grid-column:1/-1}#remi-app .teras-title{grid-column:1;grid-row:2;margin:15px 0 0;align-self:center}#remi-app .teras-title h1{font-size:52px}#remi-app .teras-play-area{grid-column:2;grid-row:2/4;padding:0;margin:0;align-self:center}#remi-app .teras-modes{margin-bottom:10px}#remi-app .teras-dock{grid-column:1;grid-row:3;margin:0}#remi-app .teras-dock .club-icon{width:36px;height:36px}#remi-app .teras-dock button{font-size:12px}#remi-app .teras-mode{min-height:78px;font-size:13px}#remi-app .teras-title>p{font-size:17px}#remi-app .teras-title>small{font-size:11px}#remi-app .kl-main-action strong{font-size:32px}#remi-app .kl-main-action{min-height:80px}#remi-app .teras-secondary{margin-top:15px}#remi-app .teras-scene-art{opacity:.75}}

#remi-app.in-game #game-view{background:var(--rug)}
#remi-app .packet-empty,#remi-app .packet-label{color:#344a30}
#remi-app .watch-meld,#remi-app .watch-meld>span:first-child,#remi-app .watch-meld small,#remi-app .watch-owner,#remi-app .watch-packet{color:#29472f}
#remi-app .account-dialog{background:var(--paper-texture),#f2dfb7;color:#29472f;border-color:#d8ba7e;border-radius:7px 13px 6px 10px}
#remi-app:is([data-hand-layout="compact"],.mobile-landscape) .hand-groups .group-expanded .fan,#remi-app:is([data-hand-layout="compact"],.mobile-landscape) .hand-groups .group-expanded .group-heading{background:var(--paper-texture),#ead3a6;border-color:#a08047;color:#29472f}
#remi-app:is([data-hand-layout="compact"],.mobile-landscape) .hand-groups .group-expanded .group-drag,#remi-app:is([data-hand-layout="compact"],.mobile-landscape) .hand-groups .group-expanded .group-drag:after,#remi-app:is([data-hand-layout="compact"],.mobile-landscape) .hand-groups .group-expanded .group-release,#remi-app:is([data-hand-layout="compact"],.mobile-landscape) .hand-groups .group-expanded .group-joker{color:#29472f}
#remi-app:is([data-hand-layout="compact"],.mobile-landscape) .hand-groups .group-expanded .fan.drop-hover{background:#ead3a6!important;opacity:1}
#remi-app .sidebar{color:#fff0cf}#remi-app .sidebar .muted,#remi-app .sidebar .score-row,#remi-app .sidebar summary,#remi-app .sidebar small{color:#fff0cf}

#remi-app:not(.at-home) .smoke path,#remi-app:not(.at-home) .street-glow{animation-play-state:paused}
/* Foreground matches the approved porch mockup: real card faces on a torn painted sign. */
#remi-app .kl-main-action{background:url('assets/teras-sign.webp') center/100% 100% no-repeat;border:0;border-radius:0;box-shadow:none;filter:drop-shadow(2px 5px 3px #35271955);min-height:106px;padding:18px 14px 16px;transform:rotate(-1deg)}
#remi-app .teras-modes{grid-template-columns:1fr 1.5fr 1fr;gap:6px;margin-bottom:10px}
#remi-app .teras-menu-cards{height:145px;z-index:1}
#remi-app .teras-menu-cards .deck-card{width:77px;height:113px;left:calc(50% - 38px);bottom:19px;background:#fff9e9;border-color:#c4ac82;box-shadow:1px 3px 7px #4d392c70}
#remi-app .teras-menu-cards .deck-card:first-child{transform:rotate(-18deg) translateX(-24px)}
#remi-app .teras-menu-cards .deck-card:nth-child(3){transform:rotate(18deg) translateX(24px)}
#remi-app .teras-menu-cards:after{content:'';position:absolute;bottom:1px;left:calc(50% - 30px);width:68px;height:47px;background:var(--back) center/cover;border:2px solid #f1e4c6;border-radius:3px;transform:rotate(-7deg) skewX(-6deg);box-shadow:0 2px #b6a78b,0 4px #e3d7b8,0 6px #a19477,0 8px #dccca6,1px 11px 6px #382c2266;z-index:4;pointer-events:none}
#remi-app .teras-mode{position:relative;z-index:5;background:var(--paper-texture),#f0deb3;border-radius:6% 3% 7% 4% / 4% 7% 3% 6%}
@media(max-width:359px){#remi-app .teras-modes{grid-template-columns:1fr 1.25fr 1fr}#remi-app .teras-menu-cards .deck-card{width:62px;height:94px;left:calc(50% - 31px)}#remi-app .teras-menu-cards{height:123px}#remi-app .teras-menu-cards .deck-card:first-child{transform:rotate(-17deg) translateX(-19px)}#remi-app .teras-menu-cards .deck-card:nth-child(3){transform:rotate(17deg) translateX(19px)}#remi-app .teras-mode{font-size:13px}#remi-app .kl-main-action{min-height:98px}}
@media(orientation:landscape) and (max-height:600px){#remi-app .teras-menu-cards{height:123px}#remi-app .teras-menu-cards .deck-card{width:62px;height:94px;left:calc(50% - 31px)}#remi-app .kl-main-action{min-height:94px}}
#remi-app .teras-modes{grid-template-columns:minmax(0,.8fr) minmax(0,1.8fr) minmax(0,.8fr)}
#remi-app .teras-mode{font-size:14px;padding-left:3px;padding-right:3px}
@media(max-width:359px){#remi-app .teras-menu-cards .deck-card{width:58px;height:88px;left:calc(50% - 29px)}#remi-app .teras-menu-cards .deck-card:first-child{transform:rotate(-15deg) translateX(-15px)}#remi-app .teras-menu-cards .deck-card:nth-child(3){transform:rotate(15deg) translateX(15px)}#remi-app .teras-mode{font-size:12px}}
/* Illustrated menu objects requested by the user; the real labels remain localized. */
#remi-app .teras-modes{grid-template-columns:minmax(0,1fr) minmax(0,1.35fr) minmax(0,1fr);align-items:center;gap:0}
#remi-app .teras-mode{position:relative;display:block;aspect-ratio:1;min-height:0;height:auto;padding:0;border:0;background:none;box-shadow:none;transform:rotate(-3deg);border-radius:0;font-size:16px}
#remi-app .teras-mode:last-child{transform:rotate(3deg)}
#remi-app .teras-choice-art{position:absolute;inset:0;background:url('assets/teras-menu-art.webp') 0% center/300% 100% no-repeat;pointer-events:none;filter:drop-shadow(0 3px 2px #45321f44)}
#remi-app .teras-mode:last-child .teras-choice-art{background-position:100% center}
#remi-app .teras-choice-label{position:absolute;inset:60% 8% 9%;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#29472f;font:700 clamp(13px,3.7vw,20px)/1.12 var(--teras-font);pointer-events:none}
#remi-app .teras-choice-label small{font-size:clamp(8px,2.1vw,11px);margin-top:4px}
#remi-app .teras-menu-cards{position:relative;aspect-ratio:1;height:auto;width:100%;background:url('assets/teras-menu-art.webp') 50% center/300% 100% no-repeat;filter:drop-shadow(0 3px 2px #45321f44)}
#remi-app .teras-menu-cards:after{content:none}
@media(orientation:landscape) and (max-height:600px){#remi-app .teras-choice-label{font-size:14px}#remi-app .teras-choice-label small{font-size:8px}}

/* Companion actions are illustrated cardboard props, matching the main choices. */
#remi-app .teras-secondary{gap:10px;margin:12px 0 0;min-height:0;align-items:center}
#remi-app .teras-secondary button{position:relative;display:block;flex:1 1 0;max-width:190px;aspect-ratio:2;min-height:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;transform:rotate(-2deg)}
#remi-app .teras-secondary button:last-child{transform:rotate(2deg)}
#remi-app .teras-banner-art{position:absolute;inset:0;background:url('assets/teras-banner-art.webp') 100% center/200% 100% no-repeat;filter:drop-shadow(0 3px 2px #45321f44);pointer-events:none}
#remi-app #club-invite-open .teras-banner-art{background-position:0% center}
#remi-app .teras-banner-label{position:absolute;inset:17% 8% 16% 43%;display:flex;align-items:center;justify-content:center;font:700 clamp(13px,3.6vw,18px)/1.1 var(--teras-font);color:#29472f;pointer-events:none}
#remi-app .teras-dock{gap:8px;margin-top:12px;padding:0}
#remi-app .teras-dock button{position:relative;display:block;aspect-ratio:1;min-height:0;padding:0;border:0;background:none;box-shadow:none;transform:rotate(-3deg)}
#remi-app .teras-dock button:nth-child(2){transform:rotate(2deg)}
#remi-app .teras-dock button:nth-child(3){transform:rotate(-1deg)}
#remi-app .teras-dock button>span{padding:0;border-radius:0;box-shadow:none;background:none}
#remi-app .teras-dock button>.teras-dock-art{position:absolute;inset:0;background:url('assets/teras-dock-art.webp') 0% center/300% 100% no-repeat;filter:drop-shadow(0 3px 2px #45321f44);pointer-events:none}
#remi-app .teras-dock button:nth-child(2)>.teras-dock-art{background-position:50% center}
#remi-app .teras-dock button:nth-child(3)>.teras-dock-art{background-position:100% center}
#remi-app .teras-dock-label{position:absolute;inset:65% 8% 9%;display:flex;align-items:center;justify-content:center;font:700 clamp(13px,3.6vw,19px)/1.1 var(--teras-font);color:#29472f;pointer-events:none}

#remi-app #club-invite-open .teras-banner-label{left:49%}

/* Approved brush-lettered title and illustrated account nameplate. */
#remi-app .teras-title{margin:36px -10px 0;filter:drop-shadow(0 2px 2px #10261940)}
#remi-app .teras-title-art{display:block;width:100%;height:auto}
#remi-app .teras-hud{display:flex;justify-content:space-between;align-items:center;gap:10px}
#remi-app .kl-profile{position:relative;display:block;width:clamp(180px,52vw,270px);max-width:100%;flex:0 1 auto;aspect-ratio:3.15;min-height:52px;padding:0;border:0;background:url('assets/teras-profile.webp') center/100% 100% no-repeat;box-shadow:none;filter:drop-shadow(0 3px 2px #142a2340)}
#remi-app .kl-avatar{position:absolute;left:2%;top:10%;bottom:10%;width:25%;height:auto;border:0;border-radius:0;box-shadow:none;background:none;font:700 clamp(25px,6.6vw,34px)/1 var(--teras-font);color:#24452f}
#remi-app .teras-profile-label{position:absolute;left:33%;right:5%;top:13%;bottom:13%;display:flex;flex-direction:column;justify-content:center;gap:1px;padding:0;transform:none;border:0;border-radius:0;background:none;box-shadow:none}
#remi-app #club-profile-name{font:700 clamp(14px,3.9vw,19px)/1.2 var(--teras-font);width:100%;color:#24452f}
#remi-app .teras-profile-label>.online-count{align-self:flex-start;margin:0;padding:0;background:none;font:700 clamp(11px,3.1vw,15px)/1.2 var(--teras-font);color:#29472f;text-shadow:none;white-space:nowrap}
#remi-app .teras-hud-tools{flex-shrink:0}
@media(orientation:landscape) and (max-height:600px){#remi-app .teras-title{margin:0;max-width:380px}#remi-app .kl-profile{width:220px}}

/* The terrace fills the viewport. Fold and desktop use outpainted environments. */
#remi-app.at-home{max-width:none;width:100%;background:#283f2c;--teras-footer-height:32px;--teras-height:calc(100dvh - var(--safe-area-inset-top,env(safe-area-inset-top,0px)) - var(--safe-area-inset-bottom,env(safe-area-inset-bottom,0px)))}
#remi-app .club-home{max-width:none;width:100%;min-height:var(--teras-height,100dvh);box-shadow:none}
#remi-app .club-home-shell{max-width:520px}
#remi-app .teras-scene-art>picture{display:block;width:100%;height:100%}
#remi-app .teras-scene-art>picture>img{display:block;width:100%;height:100%;object-fit:fill}
#remi-app .teras-scene-art{opacity:1}
#remi-app .teras-hud-tools{gap:7px}
#remi-app .teras-hud-tools button{position:relative;width:48px;height:48px;min-height:48px;padding:0;border:0;border-radius:0;background:none;box-shadow:none}
#remi-app .teras-hud-art{position:absolute;inset:0;background:url('assets/teras-hud-buttons.webp') 0% center/200% 100% no-repeat;pointer-events:none}
#remi-app [data-experience-open]>.teras-hud-art{background-position:100% center}
#remi-app .teras-hud-tools [data-sound-toggle][aria-pressed=false]{opacity:.8}
#remi-app .teras-hud-tools [data-sound-toggle][aria-pressed=false]:after{left:21%;right:21%;top:49%;height:3px;box-shadow:0 0 0 1px #355437;background:#ffe8b6}
#remi-app .club-apk{min-height:32px;padding:5px 12px}
@media(max-width:359px){#remi-app .teras-hud{gap:4px}#remi-app .teras-hud-tools{gap:3px}#remi-app .teras-hud-tools button{width:44px;height:44px;min-height:44px}#remi-app .kl-profile{width:180px}}
@media(min-width:600px){
 #remi-app .club-home-shell{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);grid-template-rows:auto minmax(0,1fr) auto;gap:18px clamp(20px,5vw,90px);width:100%;max-width:1440px;height:calc(var(--teras-height) - var(--teras-footer-height));min-height:550px;padding:24px clamp(20px,4vw,64px) 24px}
 #remi-app .teras-hud{grid-column:1/-1;grid-row:1;align-self:start}
 #remi-app .kl-profile{width:clamp(210px,22vw,280px)}
 #remi-app .teras-hud-tools button{width:56px;height:56px;min-height:56px}
 #remi-app .teras-title{grid-column:1;grid-row:2;align-self:start;justify-self:center;width:100%;max-width:580px;margin:clamp(12px,5dvh,60px) 0 0}
 #remi-app .teras-play-area{grid-column:2;grid-row:2/4;align-self:center;justify-self:center;width:100%;max-width:560px;margin:0;padding:0}
 #remi-app .teras-modes{margin:0 auto 12px;max-width:500px;grid-template-columns:minmax(0,1fr) minmax(0,1.35fr) minmax(0,1fr)}
 #remi-app .teras-mode{min-height:0}
 #remi-app .teras-menu-cards{height:auto}
 #remi-app .teras-choice-label{font-size:clamp(14px,2vw,23px)}
 #remi-app .teras-choice-label small{font-size:clamp(9px,1vw,12px)}
 #remi-app .kl-main-action{min-height:clamp(86px,12dvh,132px);padding:16px 12px}
 #remi-app .kl-main-action strong{font-size:clamp(27px,3.4vw,48px)}
 #remi-app .kl-main-action small{font-size:clamp(14px,1.6vw,21px)}
 #remi-app .teras-secondary{margin:12px 0 0;gap:12px}
 #remi-app .teras-secondary button{max-width:190px}
 #remi-app .teras-banner-label{font-size:clamp(12px,1.6vw,19px)}
 #remi-app .teras-dock{grid-column:1;grid-row:3;align-self:end;justify-self:center;width:100%;max-width:420px;margin:0;gap:10px;padding:0}
 #remi-app .teras-dock-label{font-size:clamp(13px,1.7vw,20px)}
}
@media(min-width:600px) and (max-height:620px){
 #remi-app .club-home-shell{min-height:310px;padding:10px 24px 12px;gap:6px 32px}
 #remi-app .kl-profile{width:195px;min-height:48px}
 #remi-app .teras-hud-tools button{width:46px;height:46px;min-height:46px}
 #remi-app .teras-title{margin:4px 0 0;max-width:min(100%,340px)}
 #remi-app .teras-play-area{max-width:340px;align-self:center}
 #remi-app .teras-modes{max-width:265px;margin-bottom:3px}
 #remi-app .teras-choice-label{font-size:13px}
 #remi-app .teras-choice-label small{font-size:8px}
 #remi-app .kl-main-action{min-height:68px;padding:10px 12px}
 #remi-app .kl-main-action strong{font-size:27px;line-height:1.1}
 #remi-app .kl-main-action small{font-size:13px}
 #remi-app .teras-secondary{margin:3px 0 0;gap:6px}
 #remi-app .teras-secondary button{max-width:130px}
 #remi-app .teras-banner-label{font-size:12px}
 #remi-app .teras-dock{max-width:255px;gap:6px}
 #remi-app .teras-dock-label{font-size:12px}
}
/* Anchor effects to objects on each image, so resizing never separates them. */
.teras-scene{--coffee-x:31%;--coffee-y:40.2%;--coffee-w:12%;--coffee-h:10%;--cig-x:8%;--cig-y:77.3%;--cig-w:10%;--cig-h:15%;--lamp-x:89.7%;--lamp-y:19.2%;--lamp-w:13%}
.teras-scene[data-format=fold]{--coffee-x:39.5%;--coffee-y:40.8%;--coffee-w:8%;--coffee-h:12%;--cig-x:25.4%;--cig-y:80.8%;--cig-w:7%;--cig-h:17%;--lamp-x:71.2%;--lamp-y:18.9%;--lamp-w:9%}
.teras-scene[data-format=wide]{--coffee-x:24.5%;--coffee-y:56.4%;--coffee-w:6%;--coffee-h:15%;--cig-x:11.5%;--cig-y:87.8%;--cig-w:5%;--cig-h:20%;--lamp-x:83.4%;--lamp-y:24.4%;--lamp-w:7%}
#remi-app .smoke{transform:translate(-50%,-100%);filter:blur(.8px);stroke:#fff9e8}
#remi-app .cigarette-smoke{left:var(--cig-x);top:var(--cig-y);width:var(--cig-w);height:var(--cig-h)}
#remi-app .coffee-steam{left:var(--coffee-x);top:var(--coffee-y);width:var(--coffee-w);height:var(--coffee-h)}
#remi-app .smoke path{stroke-width:3.4;animation-duration:6.8s;animation-delay:-2.4s}
#remi-app .cigarette-smoke path:nth-child(2){stroke-width:2.6;animation-delay:-5.1s;animation-duration:8.2s}
#remi-app .coffee-steam path{animation-duration:4.8s;animation-delay:-1.6s;stroke-width:3}
#remi-app .coffee-steam path:nth-child(2){animation-delay:-3.2s;animation-duration:5.4s}
#remi-app .coffee-steam path:nth-child(3){animation-delay:-4.1s;animation-duration:6s;stroke-width:2.4}
#remi-app .street-glow{left:var(--lamp-x);top:var(--lamp-y);width:var(--lamp-w);height:auto;aspect-ratio:1;transform:translate(-50%,-50%);background:radial-gradient(circle,#fff5c9b3 0 3%,#ffca6580 12%,#ffad492f 35%,transparent 69%);animation:teras-lamp 7.5s ease-in-out infinite;mix-blend-mode:screen}
@keyframes teras-smoke{0%{opacity:0;transform:translate(0,9px) scale(.8,.85)}18%{opacity:.62}50%{opacity:.44}80%{opacity:.19}100%{opacity:0;transform:translate(15px,-25px) scale(1.3,1.12)}}
@keyframes teras-steam{0%{opacity:0;transform:translateY(6px) scale(.85)}22%{opacity:.64}52%{opacity:.43}78%{opacity:.2}100%{opacity:0;transform:translate(6px,-18px) scale(1.12)}}
@keyframes teras-lamp{0%,100%{opacity:.9;transform:translate(-50%,-50%) scale(1.05)}35%{opacity:.38;transform:translate(-50%,-50%) scale(.88)}52%{opacity:.78;transform:translate(-50%,-50%) scale(1)}67%{opacity:.5}83%{opacity:.95;transform:translate(-50%,-50%) scale(1.1)}}
@media(prefers-reduced-motion:reduce){#remi-app .smoke path,#remi-app .street-glow{animation:none!important}#remi-app .smoke path{opacity:.22}#remi-app .street-glow{opacity:.65}}
@media(min-width:600px) and (max-height:420px){
 #remi-app.at-home{--teras-footer-height:24px}
 #remi-app .club-home-shell{height:calc(var(--teras-height) - var(--teras-footer-height));min-height:270px;padding:8px 18px;gap:4px 24px}
 #remi-app .kl-profile{width:180px;min-height:44px}
 #remi-app .teras-hud-tools button{width:44px;height:44px;min-height:44px}
 #remi-app .teras-title{max-width:250px;margin:0}
 #remi-app .teras-play-area{max-width:310px}
 #remi-app .teras-modes{max-width:210px}
 #remi-app .teras-choice-label{font-size:12px}
 #remi-app .kl-main-action{min-height:56px;padding:8px}
 #remi-app .kl-main-action strong{font-size:25px}
 #remi-app .kl-main-action small{font-size:12px}
 #remi-app .teras-secondary button{max-width:110px}
 #remi-app .teras-banner-label{font-size:11px}
 #remi-app .teras-dock{max-width:210px}
 #remi-app .teras-dock-label{font-size:11px}
 #remi-app .club-apk{min-height:24px;padding:3px 8px}
}
