:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:#242622;background:#fbfcf9;font-synthesis:none;--yellow:#f6d44e;--muted:#8b9085;--line:#e9ece4}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit}button{border:0;background:none}button:disabled{opacity:.5;cursor:wait}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible{outline:3px solid #c2a432;outline-offset:4px}input,textarea,select{outline:none}input:focus,textarea:focus,select:focus{border-color:#c8ae43}h1,h2,h3,p{margin-top:0}.sidebar{width:228px;position:fixed;inset:0 auto 0 0;padding:38px 25px 24px;border-right:1px solid var(--line);display:flex;flex-direction:column;background:#fff;z-index:10}.brand{font-size:33px;font-weight:900;letter-spacing:-2px;transform:rotate(-3deg);width:140px;background:var(--yellow);border-radius:13px;padding:4px 12px;text-align:center}.brand span{display:block;font-size:10px;letter-spacing:3px;padding-bottom:5px}.sidebar nav{display:grid;gap:12px;margin-top:65px}.sidebar nav button{text-align:left;padding:14px 20px;border-radius:14px;color:#777e70;display:flex;align-items:center;gap:15px}.sidebar nav button span{font-size:24px;width:25px}.sidebar nav button.active{background:#f5f6ef;color:#272c22;font-weight:650}.primary{background:var(--yellow);border-radius:12px;font-weight:650;padding:14px 20px}.primary:hover{background:#eac63a}.publish{margin-top:28px}.publish span{margin-right:12px}.sidebar-bottom{margin-top:auto}.sidebar-bottom p{font-size:11px;color:var(--muted)}.account-button{padding:15px 8px;border-top:1px solid var(--line);width:100%;text-align:left;font-size:14px}.account-button span{float:right}main{margin-left:228px;padding:0 42px 45px;max-width:1900px}header{height:106px;display:flex;align-items:center;justify-content:space-between;gap:20px}.breadcrumb{font-size:13px;color:#858b7e}.breadcrumb span{color:#363d2f;margin-left:8px}.search{display:flex;align-items:center;width:330px;background:#eff1eb;border-radius:24px;padding:4px 15px}.search input{border:none;background:transparent;padding:10px 0;min-width:0;width:100%;font-size:12px}.search button{font-size:26px}.mobile-publish{display:none}.hero{position:relative;overflow:hidden;border-radius:22px;background:#f3f0da;min-height:205px;padding:36px 40px;margin-bottom:29px}.eyebrow{font-size:10px;letter-spacing:3px;font-weight:700;color:#878b69;margin-bottom:13px}.hero h1{font-size:34px;letter-spacing:2px;margin-bottom:12px;font-weight:650}.hero p{font-size:13px;color:#7c806c;margin-bottom:0}.hero-art{position:absolute;right:70px;top:10px;width:250px;height:210px;transform:rotate(9deg)}.sun{width:100px;height:100px;border-radius:50%;background:#f1ce49;position:absolute;right:0;top:0}.art-card{position:absolute;width:130px;height:155px;background:#fff;border:8px solid #fff;border-bottom-width:28px;top:36px;left:13px;transform:rotate(-18deg);box-shadow:0 8px 18px #4c563b12;overflow:hidden}.art-card:before{content:'';position:absolute;inset:0;background:linear-gradient(155deg,#cbdad0 50%,#738a5d 51%,#9cae75 70%,#d7d6a8 71%)}.art-card.second{left:107px;top:56px;transform:rotate(12deg)}.art-card.second:before{background:radial-gradient(ellipse at 50% 60%,#d49b55 0 23%,#efddbf 24% 33%,transparent 34%),linear-gradient(35deg,#b8c5ac,#e6e1ce)}.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:25px;gap:15px}.tabs{display:flex;gap:9px;overflow:auto}.tabs button{padding:10px 20px;border-radius:25px;color:#808777;white-space:nowrap;font-size:13px}.tabs button.selected{background:#303b2a;color:#fff}.section-note{font-size:11px;color:#959b8c;white-space:nowrap}.feed{columns:4 205px;column-gap:21px}.card{break-inside:avoid;margin-bottom:24px;display:inline-block;width:100%;cursor:pointer}.cover{position:relative;border-radius:16px;overflow:hidden;background:#eef0e7;min-height:120px}.cover img,.cover video{width:100%;display:block;max-height:440px;object-fit:cover}.video-mark{position:absolute;right:12px;top:12px;background:#0006;color:white;border-radius:20px;padding:5px 9px;font-size:12px}.text-cover{padding:28px 22px;background:linear-gradient(135deg,#f6e8aa,#e5ecd9);min-height:190px;display:flex;flex-direction:column;justify-content:center}.text-cover p{font-size:20px;line-height:1.65;font-weight:650;overflow-wrap:anywhere;margin:0}.text-cover small{font-size:10px;letter-spacing:2px;color:#8a9077;margin-bottom:14px}.card h3{font-size:14px;line-height:1.6;margin:11px 3px 9px;overflow-wrap:anywhere}.card-footer{display:flex;align-items:center;justify-content:space-between;color:#8b9182;font-size:11px}.author{display:flex;gap:7px;align-items:center;min-width:0}.avatar{width:26px;height:26px;background:#e9eddc;color:#6c765c;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;font-size:12px}.like{white-space:nowrap;font-size:12px}.like.liked{color:#c29012}.empty{padding:65px 25px;text-align:center;border:1px dashed #dce2d2;border-radius:20px;background:#fff}.empty-symbol{font-size:42px;margin-bottom:20px;color:#b5bd98}.empty h2{font-size:21px}.empty p{color:#8a9180;font-size:14px;line-height:1.8}.empty .primary{margin-top:10px}.page-title{font-size:28px;margin:15px 0 10px}.subtitle{color:var(--muted);font-size:14px;margin-bottom:30px}.full{width:100%}.muted{color:var(--muted);font-size:13px;line-height:1.8}.hint{font-size:11px;line-height:1.8;color:#969b8e}.text-button{color:#787e6e;font-size:13px;padding:15px}.form-error{color:#b64d35;font-size:13px;line-height:1.6}dialog{border:1px solid var(--line);border-radius:24px;padding:38px;width:440px;max-width:calc(100vw - 24px);max-height:90vh;box-shadow:0 25px 100px #252d2526}dialog::backdrop{background:#20261d66;backdrop-filter:blur(4px)}.close{position:absolute;right:15px;top:10px;font-size:28px;color:#919787;z-index:1}.auth-logo{font-weight:850;font-size:28px;color:#9b811b;margin-bottom:24px}dialog h2{font-size:23px}.segmented{display:flex;background:#f2f4ee;border-radius:10px;padding:4px;margin:20px 0}.segmented button{width:50%;padding:9px;font-size:13px;border-radius:8px}.segmented .selected{background:white;box-shadow:0 2px 4px #0001}label{display:block;font-size:12px;color:#737b68;margin:15px 0}label input,label textarea,label select{display:block;width:100%;border:1px solid #e0e5d9;border-radius:10px;padding:13px;background:#fff;margin-top:8px;color:#303729}textarea{resize:vertical}.compose{width:600px}.dropzone{border:1px dashed #c8d1b9;background:#f6f8f1;border-radius:13px;padding:25px;text-align:center;cursor:pointer;font-size:15px}.dropzone small{display:block;font-size:10px;color:#969d8a;margin-top:10px}.dropzone input{padding:0;font-size:11px;border:0;background:none}#file-preview{display:flex;gap:8px;overflow:auto}#file-preview img,#file-preview video{width:85px;height:85px;object-fit:cover;border-radius:8px}.post-dialog{width:930px;padding:30px}.detail-layout{display:grid;grid-template-columns:1.1fr 1fr;gap:28px}.detail-media{display:flex;flex-direction:column;gap:12px}.detail-media img,.detail-media video{width:100%;border-radius:12px;background:#eee}.detail-info{padding:20px 5px}.detail-info h2{line-height:1.5;margin-top:28px;overflow-wrap:anywhere}.detail-body{white-space:pre-wrap;line-height:1.9;font-size:14px;overflow-wrap:anywhere}.detail-meta{font-size:11px;color:#a2a794;margin:20px 0}.detail-actions{display:flex;gap:14px;align-items:center}.chat-layout{display:grid;grid-template-columns:280px 1fr;min-height:550px;height:calc(100vh - 220px);border:1px solid var(--line);border-radius:18px;background:white;overflow:hidden}.conversation-list{border-right:1px solid var(--line);overflow:auto;padding:14px}.conversation-list input{width:100%;padding:11px;border:1px solid var(--line);border-radius:10px;font-size:12px}.person{padding:14px 9px;border-radius:10px;width:100%;display:flex;align-items:center;gap:10px;text-align:left}.person:hover,.person.selected{background:#f5f6ee}.person-text{min-width:0;flex:1}.person-text strong{display:block;font-size:13px}.person-text small{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#999f90;font-size:11px;margin-top:6px}.badge{background:var(--yellow);border-radius:12px;font-size:10px;padding:3px 6px}.chat-panel{display:flex;flex-direction:column;min-width:0;min-height:0}.chat-header{padding:16px 22px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}.chat-header button{font-size:11px;color:#929984}.chat-log{flex:1;overflow:auto;padding:20px;display:flex;flex-direction:column;gap:12px;background:#fafbf7}.bubble{max-width:78%;padding:12px 15px;border-radius:13px;background:#edf0e6;align-self:flex-start;white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.6}.bubble.mine{align-self:flex-end;background:#f7df86}.bubble small{display:block;font-size:9px;color:#969b86;margin-top:4px}.chat-compose{display:flex;gap:10px;padding:15px}.chat-compose input{flex:1;min-width:0;border:1px solid var(--line);border-radius:10px;padding:12px}.chat-compose button{padding:10px 18px}.chat-placeholder{margin:auto;text-align:center;color:#939a88;font-size:14px}.profile-banner{background:#f0f2e7;border-radius:20px;padding:30px;display:flex;gap:20px;align-items:center;margin-bottom:30px}.profile-banner .avatar{width:64px;height:64px;font-size:28px;background:#e1e7cc}.profile-banner h1{font-size:24px;margin-bottom:8px}.profile-banner p{margin:0;color:#8a927b;font-size:12px}.profile-banner button{margin-left:auto;font-size:12px;color:#818971}.load-more{display:block;margin:15px auto;padding:12px 30px;background:#eef1e6;border-radius:20px;font-size:12px}#toast{position:fixed;bottom:35px;left:50%;transform:translateX(-50%);background:#303b2a;color:white;border-radius:12px;padding:14px 22px;box-shadow:0 5px 30px #0002;z-index:100;display:none;font-size:13px}#unread{font-size:10px;font-style:normal;background:var(--yellow);border-radius:10px}#unread:not(:empty){padding:3px 5px}[hidden]{display:none!important}@media(min-width:1500px){.feed{columns:5 205px}}@media(max-width:1100px){.sidebar{width:190px;padding:30px 20px}main{margin-left:190px;padding:0 25px 30px}.hero-art{right:10px;opacity:.7}.hero h1{font-size:28px}.hero{padding:35px 25px}.section-note{display:none}.chat-layout{grid-template-columns:220px 1fr}.breadcrumb{display:none}}@media(max-width:700px){.sidebar{inset:auto 0 0 0;width:100%;height:68px;padding:0;background:#fffffff5;backdrop-filter:blur(8px);border-top:1px solid var(--line);border-right:0}.brand,.sidebar .publish,.sidebar-bottom{display:none}.sidebar nav{display:flex;justify-content:space-around;margin:0;gap:0;height:100%}.sidebar nav button{padding:7px 12px;gap:3px;flex-direction:column;font-size:10px;border-radius:0}.sidebar nav button span{font-size:22px}.sidebar nav button.active{background:transparent;color:#9c7d09}.sidebar nav button i{position:absolute;margin-left:33px}main{margin-left:0;padding:0 16px 90px}header{height:76px;gap:15px}.search{width:100%}.mobile-publish{display:block;background:var(--yellow);border-radius:12px;font-size:28px;flex-shrink:0;width:42px;height:42px}.hero{min-height:175px;padding:26px 22px;margin-bottom:20px}.hero h1{font-size:24px;letter-spacing:0;position:relative;z-index:1}.hero p{font-size:11px;max-width:180px;line-height:1.7;position:relative;z-index:1}.hero-art{right:-38px;top:25px;transform:scale(.7) rotate(9deg);transform-origin:right;opacity:.45}.eyebrow{font-size:8px}.tabs{gap:2px}.tabs button{padding:9px 15px;font-size:12px}.section-head{margin-bottom:20px}.feed{columns:2;column-gap:12px}.card{margin-bottom:18px}.cover{border-radius:12px}.text-cover{padding:22px 15px;min-height:155px}.text-cover p{font-size:16px}.card h3{font-size:12px}.card-footer{font-size:10px}.avatar{width:22px;height:22px}.card .author{max-width:75%;overflow:hidden}.detail-layout{grid-template-columns:1fr}.detail-info{padding:0}.post-dialog{padding:30px 20px}.chat-layout{grid-template-columns:1fr;height:calc(100dvh - 245px);min-height:350px}.chat-layout.has-peer .conversation-list{display:none}.chat-layout:not(.has-peer) .chat-panel{display:none}.chat-header{padding:12px}.chat-log{padding:12px}.chat-compose{padding:10px}.page-title{font-size:25px;margin-top:0}.subtitle{margin-bottom:20px}.profile-banner{padding:20px;gap:13px}.profile-banner h1{font-size:20px}.profile-banner .avatar{width:48px;height:48px;font-size:22px}dialog{padding:30px 23px}.empty{padding:42px 15px}#toast{bottom:85px;max-width:90vw;width:max-content}}

/* Keep mobile form controls readable without focus-triggered browser zoom. */
@media (max-width: 700px), (pointer: coarse) {
  input, textarea, select,
  .search input, .conversation-list input, .dropzone input {
    font-size: 16px;
  }
  dialog {
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

/* Keep the back action visible while reading or watching a post. */
.close {
  width: 40px; height: 40px; padding: 0;
  display: grid; place-items: center;
  border-radius: 50%; background: #f1f3ed; color: #58624f;
  font-size: 25px; line-height: 1;
}
.close:hover { background: #e7ebdf; }
.post-dialog { padding: 0 26px 26px; }
.detail-toolbar {
  position: sticky; top: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 70px; margin: 0 -26px 16px; padding: 10px 20px;
  background: #fff; border-bottom: 1px solid var(--line);
}
.detail-back {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 44px; padding: 0 12px 0 0;
  font-size: 13px; font-weight: 600; color: #3c4734;
  border-radius: 24px;
}
.back-icon {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; background: #f1f3eb; border: 1px solid #e6eadf;
  transition: background .15s ease;
}
.detail-back:hover .back-icon { background: #f6df82; }
.detail-back:active .back-icon { background: #f0d05a; }
.detail-toolbar-note { font-size: 11px; color: #929b86; letter-spacing: 2px; }
.video-frame { position: relative; background: #161b14; border-radius: 14px; overflow: hidden; }
.detail-media .video-frame video {
  display: block; width: 100%; max-height: 65dvh; min-height: 200px;
  background: #161b14; object-fit: contain; border-radius: 0;
}
.video-status {
  position: absolute; left: 50%; top: 20px; transform: translateX(-50%);
  max-width: 90%; width: max-content; padding: 9px 14px;
  border-radius: 18px; background: #000b; color: #fff;
  font-size: 12px; line-height: 1.6; pointer-events: none;
}
.video-preview-slot { min-height: 160px; background: #eef0e7; }
@media (max-width: 700px) {
  .post-dialog { padding: 0 16px 20px; }
  .detail-toolbar { margin: 0 -16px 14px; padding: 8px 14px; min-height: 64px; }
  .detail-media .video-frame video { max-height: 55dvh; }
}

.member-tag { display: block; font-size: 11px; font-weight: 400; color: #818b74; margin-top: 5px; line-height: 1.5; overflow-wrap: anywhere; }
.member-line { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.member-line strong { font-weight: 500; color: #5b674c; overflow-wrap: anywhere; }
.profile-banner .copy-member { margin-left: 5px; padding: 5px 9px; background: #e4e9d7; border-radius: 7px; color: #536442; }
.people-search-mode { margin: 0 0 12px; }
.people-search-mode select { font-size: 12px; padding: 9px; }
.chat-identity { text-align: center; min-width: 0; }
.chat-identity strong { overflow-wrap: anywhere; }
#member-label .hint { display: block; margin-top: 6px; }
@media (max-width: 700px), (pointer: coarse) { .people-search-mode select { font-size: 16px; } }

.bubble .message-meta { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.read-receipt { color: #887c50; white-space: nowrap; font-size: 10px; }
.read-receipt.is-read { color: #526b35; }

.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.author-link { padding: 0; text-align: left; }
.author-link:hover { color: #495d35; }
.profile-card { align-items: flex-start; }
.profile-details { min-width: 0; flex: 1; }
.profile-card .profile-bio { margin-top: 18px; white-space: pre-wrap; line-height: 1.8; font-size: 14px; color: #68755c; overflow-wrap: anywhere; }
.profile-actions { display: flex; flex-direction: column; gap: 12px; flex-shrink: 0; }
.profile-banner .profile-actions button { margin: 0; }
.profile-banner .profile-actions .primary { color: #343d27; padding: 11px 18px; }
.profile-editor { width: 510px; }
.avatar-editor { display: flex; align-items: center; gap: 20px; margin: 24px 0; }
.avatar-editor .avatar { width: 88px; height: 88px; font-size: 32px; border: 4px solid #f0f3e7; }
.avatar-upload { position: relative; display: inline-block; padding: 10px 16px; margin: 0; border-radius: 9px; background: #f0f3e8; color: #4a5d39; cursor: pointer; overflow: hidden; }
.avatar-upload input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.avatar-upload:focus-within { outline: 2px solid #bba33d; outline-offset: 2px; }
.avatar-editor .hint { margin: 8px 0 0; }
.avatar-editor .text-button { padding: 8px; font-size: 11px; }
#profile-form input[readonly] { background: #f6f7f1; color: #828c74; }
.profile-bio-count { text-align: right; margin-top: -8px; }
.chat-identity .avatar { float: left; width: 34px; height: 34px; margin-right: 9px; }
@media (max-width: 700px) {
  .profile-card { flex-wrap: wrap; }
  .profile-details { flex-basis: calc(100% - 65px); }
  .profile-actions { width: 100%; flex-direction: row; justify-content: flex-end; align-items: center; padding-top: 5px; }
  .avatar-editor { gap: 12px; }
  .avatar-editor .avatar { width: 72px; height: 72px; }
  .avatar-editor .hint { font-size: 10px; }
}

/* Profile information above a clear, consistently sized action row. */
.profile-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 20px 24px;
  padding: 28px;
  align-items: start;
}
.profile-card > .avatar { width: 72px; height: 72px; font-size: 28px; }
.profile-card .profile-details { grid-column: 2; }
.profile-card h1 { margin: 2px 0 12px; line-height: 1.4; overflow-wrap: anywhere; }
.profile-card .member-line { gap: 6px; line-height: 1.7; }
.profile-card .profile-bio { margin-top: 16px; }
.profile-card .profile-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  width: 100%;
  padding-top: 20px;
  border-top: 1px solid #dce3ce;
}
.profile-card .profile-actions .primary {
  min-width: 116px;
  min-height: 44px;
  padding: 12px 22px;
  font-size: 14px;
  line-height: 20px;
  border-radius: 12px;
}
@media (max-width: 700px) {
  .profile-card { grid-template-columns: 56px minmax(0, 1fr); gap: 18px 14px; padding: 20px; }
  .profile-card > .avatar { width: 56px; height: 56px; font-size: 24px; }
  .profile-card h1 { font-size: 21px; margin: 0 0 9px; }
  .profile-card .member-line { font-size: 11px; }
  .profile-card .profile-actions { gap: 10px; padding-top: 18px; }
  .profile-card .profile-actions .primary { flex: 1; min-width: 0; padding: 12px 10px; }
}

.profile-bio-label { margin-top: 18px; font-size: 12px; font-weight: 600; color: #48563b; line-height: 1.5; }
.profile-card .profile-bio { margin-top: 7px; }

.comments-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.comments-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.comments-heading h3 { margin: 0; font-size: 17px; }
.comments-heading h3 span { margin-left: 5px; font-size: 13px; font-weight: 400; color: #929b86; }
.comments-heading button { min-height: 36px; padding: 6px 10px; font-size: 12px; color: #748362; }
.comments-public-note { margin: 10px 0 18px; font-size: 11px; color: #8d9781; }
#comment-body { width: 100%; padding: 13px; border: 1px solid #e0e5d9; border-radius: 12px; background: #fafbf7; font-size: 16px; line-height: 1.65; }
#comment-body:focus { border-color: #c8ae43; }
.comment-compose-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.comment-compose-footer > span { font-size: 10px; color: #929b86; }
.comment-compose-footer .primary { min-height: 42px; padding: 10px 16px; font-size: 12px; flex-shrink: 0; }
#reply-target { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; background: #f2f4e9; border-radius: 9px; margin-bottom: 10px; font-size: 12px; line-height: 1.6; color: #6b795a; overflow-wrap: anywhere; }
#cancel-reply { width: 32px; height: 32px; font-size: 23px; flex-shrink: 0; }
.comment-item { padding: 20px 0; border-bottom: 1px solid var(--line); }
.comment-head { display: flex; align-items: center; gap: 9px; }
.comment-head .avatar { width: 32px; height: 32px; }
.comment-head strong { font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.comment-head .member-tag { margin-top: 2px; font-size: 10px; }
.author-badge { color: #87701a; background: #f8edb9; border-radius: 5px; padding: 2px 6px; font-size: 10px; flex-shrink: 0; }
.comment-body { margin: 11px 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.8; }
.comment-quote { margin: 12px 0 0; padding: 9px 12px; border-left: 2px solid #d8dec9; background: #f5f7ef; border-radius: 0 7px 7px 0; font-size: 11px; line-height: 1.7; color: #7d886f; overflow-wrap: anywhere; }
.comment-quote span { display: block; color: #8b9480; }
.comment-actions { display: flex; align-items: center; gap: 15px; font-size: 11px; color: #959d8b; }
.comment-actions button { min-height: 32px; padding: 5px 8px; font-size: 12px; }
.comment-like { margin-left: auto; white-space: nowrap; }
.comment-like.liked { color: #b68b13; }
.comments-empty { text-align: center; padding: 30px 8px; color: #949d86; font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 700px) { .comments-section { margin-top: 24px; padding-top: 20px; } }

/* A dedicated viewing layout: author, player, story, then discussion. */
.post-dialog:is(.video-detail, .note-detail) { width: 820px; padding: 0; background: #fff; }
:is(.video-detail, .note-detail) .detail-toolbar { margin: 0; padding: 10px 24px; min-height: 64px; }
:is(.video-detail, .note-detail) .detail-toolbar-note { letter-spacing: 1px; font-size: 12px; }
.video-author-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 28px; }
.video-author-bar .author { gap: 11px; min-width: 0; font-size: 14px; font-weight: 600; }
.video-author-bar .author > span:last-child { overflow-wrap: anywhere; min-width: 0; }
.video-author-bar .avatar { width: 42px; height: 42px; font-size: 18px; }
.video-author-bar .member-tag { margin-top: 4px; font-weight: 400; font-size: 11px; }
.video-author-bar > .primary { flex-shrink: 0; padding: 10px 15px; font-size: 12px; min-height: 42px; }
:is(.video-detail, .note-detail) .detail-layout { display: flex; flex-direction: column; gap: 0; }
:is(.video-detail, .note-detail) .detail-media { gap: 12px; padding: 0 24px; }
:is(.video-detail, .note-detail) .video-frame { border-radius: 16px; background: #111510; }
:is(.video-detail, .note-detail) .detail-media .video-frame video { width: 100%; height: min(56dvh, 520px); max-height: none; min-height: 200px; object-fit: contain; background: #111510; }
:is(.video-detail, .note-detail) .detail-media > img { max-height: 56dvh; object-fit: contain; }
:is(.video-detail, .note-detail) .detail-info { padding: 24px 30px 30px; }
:is(.video-detail, .note-detail) .detail-info h2 { margin: 0 0 12px; font-size: 25px; line-height: 1.5; letter-spacing: .2px; }
:is(.video-detail, .note-detail) .detail-body { color: #64705a; font-size: 14px; line-height: 1.85; }
:is(.video-detail, .note-detail) .detail-body:empty { display: none; }
:is(.video-detail, .note-detail) .detail-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 18px 0; font-size: 11px; color: #939c89; }
.video-category { padding: 6px 11px; border-radius: 8px; background: #f0f3e8; color: #6e7d57; font-size: 12px; }
:is(.video-detail, .note-detail) .detail-actions { display: flex; gap: 12px; }
:is(.video-detail, .note-detail) .detail-actions > button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 100px; min-height: 44px; padding: 10px 18px; border-radius: 23px; background: #f5f6ef; color: #68765b; font-size: 13px; }
:is(.video-detail, .note-detail) .detail-actions > .liked { background: #fff3bf; color: #9b7b0e; }
:is(.video-detail, .note-detail) .detail-actions > button:hover { background: #eef1e5; }
:is(.video-detail, .note-detail) .comments-section { margin-top: 26px; padding-top: 24px; scroll-margin-top: 82px; }
:is(.video-detail, .note-detail) .comments-heading h3 { font-size: 18px; }
:is(.video-detail, .note-detail) .comments-public-note { margin-bottom: 16px; }
:is(.video-detail, .note-detail) #comment-body { background: #f8faf3; }
:is(.video-detail, .note-detail) .comment-item { padding: 22px 0; }
:is(.video-detail, .note-detail) .comment-head .avatar { width: 36px; height: 36px; }
:is(.video-detail, .note-detail) .comment-body { margin-left: 43px; }
:is(.video-detail, .note-detail) .comment-quote { margin-left: 43px; }
:is(.video-detail, .note-detail) .comment-actions { margin-left: 35px; }
@media (max-width: 700px) {
  .post-dialog:is(.video-detail, .note-detail) { width: 100%; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  :is(.video-detail, .note-detail) .detail-toolbar { padding: max(8px, env(safe-area-inset-top)) 16px 8px; min-height: 60px; }
  .video-author-bar { padding: 16px 18px; gap: 12px; }
  .video-author-bar .avatar { width: 38px; height: 38px; }
  .video-author-bar .author { font-size: 13px; gap: 9px; }
  .video-author-bar .member-tag { font-size: 10px; }
  .video-author-bar > .primary { min-height: 40px; padding: 10px 13px; font-size: 11px; }
  :is(.video-detail, .note-detail) .detail-media { padding: 0; gap: 8px; }
  :is(.video-detail, .note-detail) .video-frame { border-radius: 0; }
  :is(.video-detail, .note-detail) .detail-media .video-frame video { height: 50dvh; min-height: 180px; }
  :is(.video-detail, .note-detail) .detail-info { padding: 20px 20px max(24px, env(safe-area-inset-bottom)); }
  :is(.video-detail, .note-detail) .detail-info h2 { font-size: 22px; margin-bottom: 9px; }
  :is(.video-detail, .note-detail) .detail-meta { margin: 15px 0; }
  :is(.video-detail, .note-detail) .detail-actions > button { flex: 1; min-width: 0; }
  :is(.video-detail, .note-detail) .comments-section { margin-top: 22px; padding-top: 22px; scroll-margin-top: 78px; }
}
@media (prefers-reduced-motion: reduce) { :is(.video-detail, .note-detail) { scroll-behavior: auto; } }


/* Image notes share the viewing layout, with uncropped, numbered photos. */
.photo-frame { position: relative; margin: 0; overflow: hidden; border-radius: 16px; background: #f4f6ef; }
.detail-media .photo-frame img { display: block; width: 100%; height: auto; max-height: 72dvh; object-fit: contain; border-radius: 0; background: transparent; }
.photo-frame figcaption { position: absolute; right: 12px; bottom: 12px; padding: 5px 10px; border-radius: 16px; background: #263321b8; color: #fff; font-size: 11px; line-height: 1.5; pointer-events: none; }
.note-detail .detail-body { font-size: 15px; line-height: 1.95; }
@media (max-width: 700px) {
  .note-detail .detail-media { gap: 12px; }
  .photo-frame { border-radius: 0; }
  .detail-media .photo-frame img { max-height: 70dvh; }
}

/* A narrower, centered discussion area on post detail pages. */
:is(.video-detail, .note-detail) .comments-section {
  width: calc(100% - 24px);
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 700px) {
  :is(.video-detail, .note-detail) .comments-section { width: calc(100% - 16px); }
}

/* Compact comment rows while retaining usable action targets. */
:is(.video-detail, .note-detail) .comment-item { padding: 12px 0; }
:is(.video-detail, .note-detail) .comment-head .avatar { width: 30px; height: 30px; }
:is(.video-detail, .note-detail) .comment-body { margin: 6px 0 3px 37px; line-height: 1.6; }
:is(.video-detail, .note-detail) .comment-quote { margin: 7px 0 0 37px; padding: 6px 10px; line-height: 1.5; }
:is(.video-detail, .note-detail) .comment-actions { margin-left: 29px; gap: 10px; }
:is(.video-detail, .note-detail) .comment-head .member-tag { margin-top: 0; }

/* Left-aligned introduction with tighter profile spacing. */
.profile-card { gap: 14px 18px; padding: 22px; }
.profile-card h1 { margin: 0 0 7px; }
.profile-introduction { grid-column: 1 / -1; min-width: 0; text-align: left; }
.profile-introduction .profile-bio-label { margin: 0; line-height: 1.5; }
.profile-card .profile-introduction .profile-bio { margin: 5px 0 0; line-height: 1.65; }
.profile-card .profile-actions { padding-top: 14px; }
@media (max-width: 700px) {
  .profile-card { gap: 12px 12px; padding: 18px; }
  .profile-card h1 { margin: 0 0 5px; }
  .profile-card .profile-actions { padding-top: 12px; }
}

/* Align avatar editing controls as two matching buttons. */
.avatar-editor { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 18px; align-items: center; }
.avatar-editor-controls { min-width: 0; }
.avatar-editor-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: stretch; }
.avatar-editor .avatar-upload,
.avatar-editor #remove-avatar {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 42px; margin: 0; padding: 10px 5px;
  border: 1px solid #dfe5d4; border-radius: 9px;
  background: #f0f3e8; color: #4a5d39;
  font-size: 12px; line-height: 20px; white-space: nowrap;
}
.avatar-editor .avatar-upload:hover,
.avatar-editor #remove-avatar:hover { background: #e7eddb; }
.avatar-editor-controls .hint { margin: 9px 0 0; line-height: 1.6; }
@media (max-width: 700px) {
  .avatar-editor { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
  .avatar-editor .avatar { width: 64px; height: 64px; }
  .avatar-editor-actions { gap: 6px; }
  .avatar-editor .avatar-upload,
  .avatar-editor #remove-avatar { font-size: 11px; }
}
@media (max-width: 360px) {
  .avatar-editor { grid-template-columns: 1fr; gap: 12px; }
  #avatar-preview { justify-self: center; }
  .avatar-editor-controls .hint { text-align: center; }
}

/* Center the avatar above a balanced pair of yellow actions. */
#profile-dialog .avatar-editor {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 14px;
  margin: 22px 0;
}
#profile-dialog #avatar-preview { justify-self: center; }
#profile-dialog .avatar-editor .avatar { width: 80px; height: 80px; font-size: 30px; }
#profile-dialog .avatar-editor-controls { width: 100%; max-width: 320px; }
#profile-dialog .avatar-editor-actions { gap: 10px; }
#profile-dialog .avatar-upload,
#profile-dialog #remove-avatar {
  min-height: 44px;
  padding: 11px 8px;
  background: var(--yellow);
  border-color: var(--yellow);
  color: #343d27;
  font-size: 13px;
  font-weight: 600;
  border-radius: 11px;
}
#profile-dialog .avatar-upload:hover,
#profile-dialog #remove-avatar:hover { background: #eac63a; border-color: #eac63a; }
#profile-dialog .avatar-editor-controls .hint { margin-top: 10px; text-align: center; }

/* Keep the avatar on the left and its controls aligned on the right. */
#profile-dialog .avatar-editor {
  grid-template-columns: 80px minmax(0, 1fr);
  justify-items: stretch;
  align-items: center;
  gap: 16px;
  margin: 22px 0;
}
#profile-dialog #avatar-preview { justify-self: start; }
#profile-dialog .avatar-editor-controls { max-width: none; }
#profile-dialog .avatar-editor-actions { gap: 8px; }
#profile-dialog .avatar-upload,
#profile-dialog #remove-avatar { padding: 11px 4px; font-size: 12px; }
#profile-dialog .avatar-editor-controls .hint { margin-top: 8px; text-align: left; }
@media (max-width: 700px) {
  #profile-dialog .avatar-editor { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
  #profile-dialog .avatar-editor .avatar { width: 64px; height: 64px; font-size: 26px; }
  #profile-dialog .avatar-editor-actions { gap: 6px; }
  #profile-dialog .avatar-upload,
  #profile-dialog #remove-avatar { font-size: 11px; }
}
@media (max-width: 360px) {
  #profile-dialog .avatar-editor { grid-template-columns: 52px minmax(0, 1fr); gap: 8px; }
  #profile-dialog .avatar-editor .avatar { width: 52px; height: 52px; font-size: 23px; }
  #profile-dialog .avatar-editor-actions { gap: 4px; }
  #profile-dialog .avatar-upload,
  #profile-dialog #remove-avatar { padding-left: 2px; padding-right: 2px; font-size: 10px; }
}

.chat-call-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.chat-call-toolbar button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 12px; min-height: 38px; border-radius: 10px; background: #f7df86; color: #5a542e; font-size: 12px; }
.chat-call-toolbar svg { width: 17px; height: 17px; }
#call-dialog { width: 540px; padding: 22px; background: #f8faf3; }
.call-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #8a947b; }
#call-close { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #eaf0e0; font-size: 25px; color: #5b6949; }
.call-identity { text-align: center; padding: 22px 0 12px; }
#call-person .avatar { width: 82px; height: 82px; font-size: 32px; margin-bottom: 16px; border: 5px solid #e9efdc; }
#call-name { margin: 0 0 6px; font-size: 24px; overflow-wrap: anywhere; }
#call-member { color: #8c967e; font-size: 11px; overflow-wrap: anywhere; }
#call-status { min-height: 24px; font-size: 14px; color: #607249; margin: 16px 0 0; line-height: 1.6; }
.call-stage { display: none; position: relative; background: #151c12; border-radius: 16px; overflow: hidden; margin: 12px 0; height: 320px; }
.is-video:not(.call-ended) .call-stage { display: block; }
#call-remote { width: 100%; height: 100%; object-fit: contain; display: block; }
#call-local { position: absolute; bottom: 12px; right: 12px; width: 112px; height: 140px; border: 2px solid #ffffffa0; border-radius: 10px; object-fit: cover; transform: scaleX(-1); background: #252f20; }
#call-local.camera-off { opacity: .15; }
.call-controls { display: flex; justify-content: center; gap: 10px; margin: 16px 0; }
.call-controls button { min-height: 42px; padding: 10px 13px; border-radius: 12px; background: #e9efde; color: #536640; font-size: 12px; }
.call-controls button[aria-pressed=true] { background: #f7df86; color: #65501a; }
.call-actions { display: flex; justify-content: center; gap: 14px; margin: 18px 0 12px; }
.call-actions button { min-width: 110px; min-height: 46px; border-radius: 24px; padding: 12px 24px; font-size: 14px; font-weight: 600; }
.call-danger { background: #db6859; color: #fff; }
.call-danger:hover { background: #c85b4d; }
.call-footnote { margin: 18px 0 0; text-align: center; color: #96a087; font-size: 10px; line-height: 1.7; }
#call-enable-audio { display: block; margin: 12px auto; font-size: 12px; }
#call-error { color: #b9533e; font-size: 12px; text-align: center; }
#call-dialog.is-video .call-identity { padding-top: 12px; }
#call-dialog.is-video #call-person .avatar { width: 42px; height: 42px; font-size: 18px; margin-bottom: 8px; border-width: 2px; }
#call-dialog.is-video #call-name { font-size: 20px; }
#call-dialog.is-video #call-status { margin-top: 10px; }
@media (max-width: 700px) {
  .chat-call-toolbar { justify-content: stretch; padding: 7px 10px; }
  .chat-call-toolbar button { flex: 1; }
  #call-dialog { padding: 18px; }
  .call-stage { height: 34dvh; min-height: 190px; }
  #call-local { width: 80px; height: 100px; }
}

.library-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.library-tabs button { flex: 1; padding: 14px 10px; min-height: 48px; border-radius: 12px 12px 0 0; color: #8a947b; font-size: 14px; font-weight: 600; border-bottom: 3px solid transparent; }
.library-tabs button.selected { color: #443f26; border-bottom-color: #e7c435; background: #fbf5db; }
.library-tabs button span { margin-left: 7px; font-size: 11px; font-weight: 400; }
.library-note { margin: 0 0 24px; font-size: 11px; line-height: 1.6; color: #929b86; }
.private-badge { position: absolute; z-index: 1; top: 10px; left: 10px; padding: 5px 8px; background: #303b2abf; color: #fff; border-radius: 12px; font-size: 10px; }
:is(.video-detail,.note-detail) .detail-actions > .post-save[aria-pressed=true] { background: #fff3bf; color: #9b7b0e; }
.post-visibility-controls { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: #f7f8f2; color: #8b957e; font-size: 11px; }
.post-visibility-controls button { min-height: 32px; padding: 6px 10px; border-radius: 8px; color: #62764a; background: #eaf0df; font-size: 12px; }
@media (max-width: 700px) {
  .library-tabs { gap: 4px; }
  .library-tabs button { font-size: 13px; padding: 12px 4px; }
  .library-tabs button span { margin-left: 5px; }
  :is(.video-detail,.note-detail) .detail-actions { gap: 8px; }
  :is(.video-detail,.note-detail) .detail-actions > button { padding: 10px 8px; font-size: 12px; }
}

/* Profile social statistics */
.profile-stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding: 12px 0; background: #f8f6e9; border-radius: 12px; }
.profile-stats > div, .profile-stats > button { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px; min-width: 0; }
.profile-stats > * + * { border-left: 1px solid #e4e3d3; }
.profile-stats strong { font-size: 21px; line-height: 1.3; overflow-wrap: anywhere; }
.profile-stats span { font-size: 12px; color: #68755c; }
.profile-actions .follow-button[aria-pressed="true"] { background: #eee9cf; }

.chat-call-toolbar { flex-wrap: wrap; }
.chat-call-toolbar button:disabled { opacity: .45; cursor: not-allowed; }

.chat-settings { display: flex; justify-content: flex-end; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.chat-settings button { padding: 7px 10px; font-size: 12px; border-radius: 8px; background: #f4f2e7; color: #68755c; }
.chat-settings button[aria-pressed="true"] { background: var(--yellow); color: #343c2c; }
.muted-label { font-size: 11px; font-weight: normal; color: #8a927b; }

.conversation-row { --chat-actions-width: min(58%, 180px); position: relative; overflow: hidden; border-radius: 12px; margin-bottom: 5px; touch-action: pan-y; -webkit-touch-callout: none; user-select: none; }
.conversation-front { position: relative; z-index: 1; background: #fff; width: 100%; transition: width .2s ease; padding-right: 28px; }
.conversation-front .person { width: 100%; margin: 0; }
.conversation-row.is-pinned .conversation-front { background: #fff8d9; }
.conversation-front .person { background: transparent; }
.conversation-more { position: absolute; right: 2px; top: 20px; width: 28px; height: 36px; font-size: 22px; }
.conversation-flags { display: block; padding: 0 12px 7px; color: #8a8060; font-size: 10px; }
.conversation-flags:empty { display: none; }
.conversation-actions { position: absolute; inset: 0 0 0 auto; width: var(--chat-actions-width); display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); background: #fff1ad; }
.conversation-actions button { font-size: 12px; padding: 8px 3px; border-right: 1px solid #fff9; }
.conversation-actions button[data-chat-action="clear"] { background: #ffe3d7; color: #93412c; }
.conversation-row.actions-open .conversation-front { width: calc(100% - var(--chat-actions-width)); padding-right: 0; }
.conversation-row.actions-open .conversation-more { display: none; }
.conversation-row.actions-open .conversation-front .person { overflow: hidden; }
.conversation-row.actions-open .conversation-flags { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.conversation-menu { width: min(380px,calc(100vw - 32px)); padding: 22px; border-radius: 20px; }
.conversation-menu h2 { font-size: 19px; margin: 0 0 8px; }
.conversation-menu p { font-size: 12px; color: #818971; line-height: 1.6; }
.conversation-menu > div { display: grid; gap: 8px; margin-top: 18px; }
.conversation-menu [data-chat-action],.menu-cancel { padding: 13px; border-radius: 10px; background: #f5f3e8; }
.conversation-menu [aria-pressed="true"] { background: #ffe680; }
.conversation-menu [data-chat-action="clear"] { color: #a04330; }
.menu-cancel { width: 100%; margin-top: 14px; background: #eee; }
@media(prefers-reduced-motion:reduce){.conversation-front { transition: none; }}

/* Prevent the native mobile copy/image menu only on conversation controls. */
.conversation-row, .conversation-row *, .conversation-menu, .conversation-menu * {
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.conversation-row img { -webkit-user-drag: none; }

.profile-card .profile-stats > button { margin: 0; padding: 0; background: transparent; color: inherit; font: inherit; }
.profile-stats > button:hover { color: #9c7d09; }
.profile-stats > button:focus-visible { outline: 2px solid #b99a22; outline-offset: 3px; border-radius: 8px; }
.connections-dialog { width: min(480px,calc(100vw - 24px)); max-height: 80dvh; padding: 20px; border-radius: 20px; }
.connections-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.connections-heading h2 { margin: 0; font-size: 19px; overflow-wrap: anywhere; }
.connections-heading button { flex-shrink: 0; background: #fff0a3; border-radius: 10px; width: 36px; height: 36px; }
.connections-tabs { display: flex; gap: 8px; margin-top: 18px; }
.connections-tabs button { flex: 1; padding: 11px; background: #f5f3e9; border-radius: 10px; }
.connections-tabs button[aria-pressed="true"] { background: var(--yellow); }
#connections-total { color: #818971; font-size: 12px; margin: 14px 0 4px; }
.connection-person { display: flex; width: 100%; gap: 12px; align-items: center; text-align: left; padding: 14px 0; border-bottom: 1px solid #eef0e6; }
.connection-person .avatar { width: 42px; height: 42px; flex-shrink: 0; }
.connection-person > span:nth-child(2) { flex: 1; min-width: 0; }
.connection-person strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.connection-person small { display: block; font-size: 11px; color: #818971; margin-top: 5px; overflow-wrap: anywhere; }
.connection-person .connection-bio { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.connections-empty { padding: 35px 0; text-align: center; color: #818971; }
#connections-more { width: 100%; padding: 12px; margin-top: 12px; border-radius: 10px; background: #fff0a3; }

.profile-card .profile-actions { flex-wrap: wrap; }
.profile-card .profile-actions .primary { min-width: 0; flex: 1; white-space: nowrap; padding-left: 8px; padding-right: 8px; }
.system-dialog { width: min(500px,calc(100vw - 24px)); max-height: 85dvh; padding: 20px; border-radius: 20px; }
.system-heading { display: flex; gap: 10px; align-items: center; }
.system-heading h2 { flex: 1; font-size: 19px; margin: 0; }
.system-heading button { width: 36px; height: 36px; background: #fff0a3; border-radius: 10px; flex-shrink: 0; }
.system-intro,.system-footnote { font-size: 12px; color: #818971; line-height: 1.7; margin: 18px 0; }
.system-menu { display: grid; gap: 10px; }
.system-menu button { display: flex; align-items: center; justify-content: space-between; padding: 16px; text-align: left; background: #f6f5ea; border-radius: 12px; gap: 12px; }
.system-menu strong,.privacy-option strong { display: block; font-size: 14px; }
.system-menu small,.privacy-option small { display: block; font-size: 12px; color: #818971; line-height: 1.6; margin-top: 5px; }
.privacy-option { display: flex; gap: 16px; justify-content: space-between; align-items: center; padding: 17px 0; border-bottom: 1px solid #e9eddf; }
.privacy-option input { width: 22px; height: 22px; accent-color: #c5a211; flex-shrink: 0; }
.system-history-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.system-history-head p { color: #818971; font-size: 11px; line-height: 1.6; }
.system-history-head button { background: #fff0a3; border-radius: 8px; padding: 8px; white-space: nowrap; font-size: 12px; }
.system-history-row { display: flex; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid #e9eddf; }
.system-history-row > button:first-child { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: center; text-align: left; }
.system-history-row strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.system-history-row small { display: block; font-size: 11px; color: #818971; margin-top: 6px; overflow-wrap: anywhere; }
.history-kind { background: #fff0a3; padding: 12px 6px; font-size: 11px; border-radius: 8px; flex-shrink: 0; }
.system-history-row > button:last-child { font-size: 12px; color: #986b4e; flex-shrink: 0; padding: 7px; }
.system-empty { text-align: center; color: #818971; line-height: 1.8; font-size: 13px; padding: 36px 0; }
.system-about { text-align: center; margin: 24px 0; }
.system-app-icon { display: grid; place-items: center; background: var(--yellow); width: 72px; height: 72px; border-radius: 20px; font-weight: bold; margin: auto; }
.system-about p,.system-facts p { font-size: 12px; color: #818971; line-height: 1.8; }
.support-card { background: #f6f5ea; padding: 18px; border-radius: 12px; }
.support-card .avatar { margin-right: 10px; }
.support-card p { font-size: 12px; overflow-wrap: anywhere; }
.support-card .primary { padding: 10px 16px; border-radius: 10px; }

.profile-card .profile-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.wallet-dialog { width: min(500px,calc(100vw - 24px)); max-height: 85dvh; border-radius: 20px; padding: 20px; }
.wallet-heading { display: flex; justify-content: space-between; align-items: center; }
.wallet-heading h2 { font-size: 19px; margin: 0; }
.wallet-heading button { width: 36px; height: 36px; border-radius: 10px; background: #fff0a3; }
.wallet-balance { background: #ffdf65; border-radius: 16px; padding: 22px; margin-top: 20px; }
.wallet-balance p { margin: 0 0 8px; font-size: 13px; color: #6c5b22; }
.wallet-balance > strong { font-size: 38px; line-height: 1.3; overflow-wrap: anywhere; }
.wallet-balance > div { display: flex; gap: 16px; justify-content: space-between; margin-top: 18px; font-size: 11px; color: #6c5b22; }
.wallet-balance b { display: block; font-size: 16px; margin-top: 5px; overflow-wrap: anywhere; }
.wallet-note { font-size: 12px; color: #818971; line-height: 1.7; margin: 15px 0 24px; }
#wallet-body h3 { font-size: 15px; }
.wallet-tabs { display: flex; gap: 8px; }
.wallet-tabs button { flex: 1; padding: 10px; border-radius: 10px; background: #f5f3e8; }
.wallet-tabs button[aria-pressed="true"] { background: #fff0a3; }
.wallet-empty { text-align: center; padding: 32px 0; color: #818971; font-size: 13px; }
.wallet-entry { display: flex; justify-content: space-between; gap: 12px; padding: 15px 0; border-bottom: 1px solid #edf0e5; }
.wallet-entry > span { min-width: 0; }
.wallet-entry strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
.wallet-entry small { display: block; font-size: 11px; color: #818971; margin-top: 5px; }
.wallet-entry b { flex-shrink: 0; font-size: 15px; }
.wallet-entry .income { color: #6b853e; }
.wallet-entry .spent { color: #916443; }
#wallet-more,[data-wallet-retry] { padding: 12px; width: 100%; background: #fff0a3; border-radius: 10px; }
.wallet-tools { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.wallet-tools button { padding: 12px 8px; border-radius: 10px; background: #fff0a3; }
#wallet-operation:not(:empty) { margin-top: 16px; padding: 14px; background: #f8f7ef; border-radius: 12px; }
#wallet-operation label { display: block; font-size: 12px; margin: 12px 0; }
#wallet-operation input:not([type=checkbox]),#wallet-operation select { display: block; width: 100%; padding: 10px; margin-top: 6px; border: 1px solid #dce2d0; border-radius: 8px; background: white; }
#wallet-operation .primary { padding: 11px 14px; border-radius: 10px; }
#wallet-operation .wallet-check { display: flex; align-items: center; gap: 8px; }
.wallet-order { border-bottom: 1px solid #dde3d1; padding: 12px 0; }
.wallet-order strong,.wallet-order small { display: block; font-size: 12px; margin: 6px 0; overflow-wrap: anywhere; }
.wallet-order small { color: #818971; }
.wallet-order button,[data-wallet-admin-orders] { padding: 9px; border-radius: 8px; margin: 5px 5px 0 0; background: #fff0a3; font-size: 12px; }
.deposit-heading h3 { margin: 0 0 8px; }
.deposit-heading [role=status] { display: inline-block; background: #fff0a3; border-radius: 8px; padding: 6px 9px; font-size: 12px; }
.deposit-amount { font-size: 12px; overflow-wrap: anywhere; }
.deposit-amount strong { display: block; font-size: 20px; margin-top: 5px; }
.deposit-qr { display: block; max-width: 100%; height: auto; margin: 14px auto; border-radius: 12px; }
.deposit-address { display: block; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; margin-top: 8px; padding: 12px; border: 1px solid #dce2d0; border-radius: 8px; background: white; line-height: 1.7; }
#wallet-operation[data-kind=payment] .wallet-note { overflow-wrap: anywhere; }
#wallet-operation[data-kind=payment] [data-wallet-action=orders] { padding: 10px 12px; border-radius: 8px; background: #fff0a3; }
#wallet-operation [data-manual-view],#wallet-operation [data-manual-copy],.manual-review button { padding: 10px 12px; background: #fff0a3; border-radius: 8px; margin: 6px 5px 6px 0; }
.manual-review { margin-top: 12px; padding: 12px; background: #fffdf6; border-radius: 10px; }
.manual-export { display: inline-block; padding: 10px 12px; border-radius: 8px; background: #fff0a3; color: #414b32; font-size: 13px; }
#wallet-operation .wallet-check input[type=checkbox] { width: 18px; height: 18px; flex: 0 0 18px; margin: 0; padding: 0; }
#wallet-operation .wallet-check { justify-content: flex-start; line-height: 1.6; }
.address-feedback { padding: 10px 12px; border-radius: 8px; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; background: #fff0a3; color: #554915; }
.address-feedback[data-state=success] { background: #eaf3e3; color: #365b28; }
.address-feedback[data-state=error] { background: #fff0ec; color: #9c3828; }
.earn-title,.earn-title > div { display: flex; align-items: center; gap: 10px; }
.earn-title { justify-content: space-between; flex-wrap: wrap; }
.earn-title h3 { margin: 0; font-size: 18px; }
.earn-symbol { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #f6d44e; font-size: 24px; }
.earn-badge { padding: 5px 9px; background: #eceee5; color: #666f59; border-radius: 8px; font-size: 12px; }
.earn-available { padding: 16px; border-radius: 12px; background: #fff0a3; margin-top: 16px; }
.earn-available > span { display: block; font-size: 12px; margin-bottom: 8px; }
.earn-available strong { display: block; font-size: 26px; overflow-wrap: anywhere; }
.earn-available small { font-size: 12px; font-weight: 400; }
.wallet-earn h4 { margin: 18px 0 10px; font-size: 14px; }
.earn-empty { padding: 18px 14px; border: 1px solid #e1e5d5; border-radius: 12px; background: #fffdf5; }
.earn-empty strong { font-size: 14px; }
.earn-empty p,.earn-records p { font-size: 12px; color: #768068; line-height: 1.8; }
.earn-empty button { width: 100%; padding: 11px; background: #eeead4; border-radius: 8px; cursor: not-allowed; }
.earn-records { border-bottom: 1px solid #e1e5d5; padding-bottom: 8px; }
.earn-terms { margin: 16px 0; font-size: 12px; }
.earn-terms > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #e8ebdf; }
.earn-terms dt { color: #768068; }
.earn-terms dd { margin: 0; text-align: right; }
.earn-estimate { display: grid; gap: 14px; padding: 14px; border-radius: 10px; background: #fff0a3; font-size: 12px; overflow-wrap: anywhere; }
.earn-estimate strong { display: block; font-size: 18px; margin-top: 5px; }
.earn-feedback { color: #8c392a; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.earn-feedback:empty { display: none; }
.wallet-earn [data-earn-admin],.wallet-earn [data-earn-refresh],[data-earn-back],#earn-toggle { padding: 10px; border-radius: 8px; background: #fff0a3; margin: 10px 8px 0 0; }
.entertainment-page { max-width: 1000px; margin: 0 auto; }
.entertainment-hero { padding: 38px 28px; border-radius: 20px; background: #fff0a3; }
.entertainment-symbol { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: #f6d44e; font-size: 32px; }
.entertainment-hero h1 { margin: 18px 0 10px; font-size: 28px; }
.entertainment-hero p { margin: 0; font-size: 14px; color: #736330; line-height: 1.7; }
.entertainment-empty { padding: 48px 20px; margin-top: 22px; border: 1px dashed #dce2d0; border-radius: 18px; text-align: center; }
.entertainment-empty h2 { font-size: 17px; font-weight: 500; }
.entertainment-empty p { font-size: 13px; color: #818971; }
@media(max-width:700px) {
  .sidebar nav { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); width: 100%; }
  .sidebar nav button { min-width: 0; padding: 7px 2px; white-space: nowrap; justify-content: center; }
  .entertainment-hero { padding: 26px 22px; }
}
.compose-enhancements { margin: 16px 0; padding: 16px; border-radius: 14px; background: #f8f7ed; }
.compose-enhancements h3 { font-size: 15px; margin-bottom: 12px; }
.compose-enhancements input[type=range],.post-music input[type=range] { padding: 0; accent-color: #caa21b; width: 100%; }
.music-preview-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
#music-preview,#auto-layout { padding: 9px 12px; border-radius: 8px; background: #fff0a3; }
#file-preview[data-layout] { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
#file-preview[data-layout] :is(img,video) { width: 100%; height: 100px; object-fit: contain; border-radius: 8px; background: #f4f6ef; }
#file-preview[data-layout=magazine],#file-preview[data-count="1"],#file-preview.preview-has-video { grid-template-columns: 1fr; }
#file-preview[data-layout=magazine] :is(img,video),#file-preview[data-count="1"] :is(img,video),#file-preview.preview-has-video :is(img,video) { height: auto; max-height: 240px; }
#post-detail .detail-media[data-layout=grid]:not(.layout-has-video),#post-detail .detail-media[data-layout=auto]:not(.layout-has-video):not([data-count="1"]) { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; align-items: start; }
#post-detail .detail-media[data-layout=grid]:not(.layout-has-video) .photo-frame img { aspect-ratio: 1; object-fit: contain; }
#post-detail .detail-media[data-layout=magazine] { display: flex; flex-direction: column; }
#post-detail .detail-body { overflow-wrap: anywhere; line-height: 1.85; }
.post-music { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: #fff6cf; border-radius: 12px; padding: 12px; margin-bottom: 14px; }
.post-music > div { flex: 1; min-width: 130px; }
.post-music strong,.post-music small { display: block; }
.post-music strong { font-size: 13px; }
.post-music small { color: #818971; font-size: 11px; margin-top: 4px; }
.post-music button { padding: 8px 12px; border-radius: 8px; font-size: 12px; }
.post-music label { white-space: nowrap; display: flex; align-items: center; gap: 8px; font-size: 12px; width: 100%; margin: 0; }
.post-music .hint { margin: 0; width: 100%; }
.post-music .hint:empty { display: none; }
#file-preview[data-layout=auto]:not(.preview-has-video):not([data-count="1"]) { grid-template-columns: repeat(2,minmax(0,1fr)); }
#post-detail .detail-media[data-layout=grid]:not(.layout-has-video) { grid-template-columns: repeat(3,minmax(0,1fr)); }

.post-music label input[type=range] { flex: 1; min-width: 0; width: auto; }

#music-preview-player audio { display: block; width: 100%; height: 44px; margin-top: 12px; }
#music-preview-status { margin: 8px 0 12px; line-height: 1.6; }

.music-edit-note { display: block; margin-top: 4px; }
#music-credit a,.post-music small a { color: #655314; text-decoration: underline; text-underline-offset: 2px; }
#music-credit { line-height: 1.6; }
#points-page { max-width: 1000px; margin: 0 auto; }
.points-hero { display: flex; align-items: center; gap: 18px; padding: 24px; }
.points-hero h1 { margin: 0 0 7px; }
.points-notice,.points-game-note { color: #79806c; font-size: 13px; line-height: 1.7; margin: 15px 0; }
.points-summary { display: flex; justify-content: space-between; align-items: center; background: #fff3be; border-radius: 18px; padding: 22px; gap: 12px; }
.points-summary span,.points-summary strong,.points-summary small { display: block; }
.points-summary strong { font-size: 38px; margin: 7px 0; font-variant-numeric: tabular-nums; }
.points-summary small { font-size: 12px; color: #73775e; }
.points-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.points-card { border: 1px solid #e6e8dc; border-radius: 16px; padding: 20px; margin: 16px 0; background: #fff; min-width: 0; }
.points-card h2 { font-size: 18px; margin: 0 0 12px; }
.points-card p { font-size: 13px; line-height: 1.7; margin: 8px 0; overflow-wrap: anywhere; }
#points-page button { padding: 10px 14px; border-radius: 9px; }
#points-page button:disabled { opacity: .5; cursor: not-allowed; }
#points-page input,#points-page select,#points-page textarea { font-size: 16px; min-width: 0; width: 100%; box-sizing: border-box; }
#points-page label { margin: 12px 0; }
.points-tabs { display: flex; gap: 10px; margin-top: 16px; }
.points-tabs button[aria-pressed=true] { background: #f7d449; }
.points-status { min-height: 20px; color: #825529; overflow-wrap: anywhere; }
#points-notice { color: #4e6c2d; line-height: 1.7; }
.points-member-result:not(:empty),.points-pending { margin: 12px 0; padding: 12px; border-radius: 10px; background: #f5f7ef; }
.points-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.points-row select { max-width: 150px; }
.points-badge { background: #f5f0da; padding: 4px 10px; border-radius: 20px; font-size: 12px; white-space: nowrap; }
.points-request { padding: 14px 0; border-bottom: 1px solid #eceee5; }
.points-request small,.points-entry small { color: #858b78; font-size: 12px; line-height: 1.7; }
.points-request:last-child,.points-entry:last-child { border-bottom: 0; }
.points-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.points-entry { display: flex; gap: 12px; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid #eceee5; font-size: 13px; }
.points-entry > div { min-width: 0; overflow-wrap: anywhere; }
.points-entry-value { flex-shrink: 0; text-align: right; }
.points-entry-value strong,.points-entry-value small { display: block; }
.points-positive { color: #64833a; }
.points-empty { text-align: center; color: #858b78; padding: 15px; }
.points-more { display: block; margin: 12px auto 0; background: #f5f7ef; }
@media(max-width:700px) {
 .points-grid { grid-template-columns: 1fr; gap: 0; }
 .points-card { padding: 16px; margin: 12px 0; }
 .points-hero { padding: 20px; }
 .points-hero h1 { font-size: 25px; }
 .points-summary { padding: 18px; }
}
#mahjong-area { margin: 20px 0; }
.mj-lobby,.mj-room { padding: 22px; border: 1px solid #dce6d6; border-radius: 18px; background: #f5f8f0; }
.mj-title,.mj-room-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.mj-room-header { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px 10px; }
.mj-room-header > div:first-child { display: contents; }
.mj-room-header h2 { grid-column: 1 / -1; grid-row: 1; }
.mj-room-header p { grid-column: 1; grid-row: 2; }
.mj-room-header .mj-room-actions { grid-column: 2; grid-row: 2; justify-self: end; transform: translateY(-12px); }
.mj-room-actions { display: grid; grid-template-columns: 1fr; align-items: stretch; gap: 8px; width: 104px; }
.mj-room-actions:empty { display: none; }
.mj-room-actions button { white-space: nowrap; width: 100%; min-width: 0; min-height: 40px; margin: 0; }
.mj-title h2,.mj-room-header h2 { font-size: 21px; margin: 0 0 8px; }
.mj-room-header h2 { margin: 0; white-space: nowrap; font-size: 24px; letter-spacing: .08em; }
.mj-title p,.mj-room-header p { margin: 0; font-size: 13px; color: #6b785f; }
.mj-mark { background: #fffdf3; color: #c73c2d; border: 1px solid #dddfd3; border-bottom: 4px solid #789b69; padding: 10px 16px; border-radius: 9px; font-size: 28px; font-weight: 700; }
.mj-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
#points-page .mj-buttons [data-mj="peng"],#points-page .mj-buttons [data-mj="pass"] { min-width: 84px; min-height: 44px; padding: 10px 20px; border-radius: 10px; font-weight: 600; }
#points-page .mj-buttons [data-mj="peng"] { background: #f6d44e; color: #40340d; border: 1px solid #d8b635; }
#points-page .mj-buttons [data-mj="pass"] { background: #e5e7eb; color: #374151; border: 1px solid #b9c0c9; }
#points-page .mj-buttons [data-mj="peng"]:hover:not(:disabled) { background: #ebc332; }
#points-page .mj-buttons [data-mj="pass"]:hover:not(:disabled) { background: #d1d5db; }
.mj-table-controls { margin-top: 16px; padding-top: 16px; border-top: 1px solid #dce4d6; }
.mj-control-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 10px; }
.mj-control-row > :only-child { grid-column: 1 / -1; }
#points-page .mj-control-row button { width: 100%; min-height: 44px; padding: 11px 8px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.mj-table-controls > .hint { margin: 12px 0 0; font-size: 12px; line-height: 1.65; }
#mj-join { display: flex; gap: 10px; align-items: end; margin-top: 18px; }
#mj-join label { flex: 1; min-width: 0; margin: 0; }
.mj-status { color: #805c25; font-size: 13px; min-height: 20px; line-height: 1.6; }
.mj-rules,.mj-log { border-top: 1px solid #dce4d6; padding-top: 12px; font-size: 13px; line-height: 1.7; margin-top: 12px; }
.mj-rules summary,.mj-log summary { cursor: pointer; font-weight: 600; }
.mj-turn-status { padding: 12px; border-radius: 10px; background: #e1ecd9; color: #3b5b2b; font-size: 14px; line-height: 1.7; }
#mj-countdown { white-space: nowrap; color: #866518; }
.mj-seats { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.mj-seat { padding: 12px; background: white; border: 2px solid transparent; border-radius: 12px; min-width: 0; overflow-wrap: anywhere; }
.mj-seat strong,.mj-seat small,.mj-seat > span { display: block; }
.mj-seat strong { font-size: 14px; }.mj-seat small,.mj-seat p,.mj-seat > span { font-size: 11px; color: #79856c; margin: 5px 0; }
.mj-active-seat { border-color: #d7b229; }
.mj-tile { display: inline-flex; flex-direction: column; justify-content: center; align-items: center; width: 33px; height: 48px; background: #fffdf4; border: 1px solid #d1d9c6; border-bottom: 4px solid #91a77d; border-radius: 5px; box-sizing: border-box; vertical-align: middle; flex-shrink: 0; }
.mj-tile b { font-size: 20px; line-height: 1.1; }.mj-tile small { font-size: 11px; margin: 0; color: inherit; }
.mj-suit-0,.mj-red { color: #b64432; }.mj-suit-1 { color: #2c6d8c; }.mj-suit-2 { color: #467a40; }
.mj-discards,.mj-melds { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 7px; }
.mj-discards .mj-tile,.mj-melds .mj-tile { width: 21px; height: 30px; border-bottom-width: 2px; border-radius: 3px; }
.mj-discards .mj-tile b,.mj-melds .mj-tile b { font-size: 13px; }.mj-discards .mj-tile small,.mj-melds .mj-tile small { font-size: 8px; }
.mj-melds > span { display: inline-flex; flex-wrap: wrap; margin-right: 5px; max-width: 100%; }
.mj-melds > span > small { width: 100%; margin: 0 0 3px; }
.mj-hidden { background: #e1ecd9; color: #657f55; }
.mj-hand-panel { margin-top: 18px; padding-top: 10px; border-top: 1px solid #dce4d6; }
.mj-hand { display: flex; gap: 2px; align-items: end; padding-top: 15px; min-height: 70px; }
#points-page .mj-hand button { padding: 0; border: 0; background: transparent; flex: 1; min-width: 0; max-width: 42px; border-radius: 5px; }
.mj-hand .mj-tile { width: 100%; height: 55px; }
#points-page .mj-hand button:disabled { opacity: 1; }
.mj-hand button[aria-pressed=true] { transform: translateY(-9px); outline: 2px solid #dabd46; }
.mj-result { margin-top: 16px; padding: 18px; border-radius: 13px; background: #fff2ba; font-size: 14px; }
.mj-result h3 { margin: 0 0 12px; }.mj-result details p { font-size: 12px; line-height: 1.8; }
.mj-bonus { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 15px; overflow-wrap: anywhere; }
.mj-score-breakdown { font-size: 12px; color: #79692e; margin: -6px 0 16px; }
.mj-kong-ledger { margin: 14px 0; }
@media(max-width:700px) {
 .mj-lobby,.mj-room { padding: 12px; }.mj-title h2,.mj-room-header h2 { font-size: 18px; }
 .mj-hand .mj-tile { height: 44px; }.mj-hand .mj-tile b { font-size: 16px; }.mj-hand .mj-tile small { font-size: 10px; }
 .mj-seat { padding: 9px; }.mj-hand { gap: 1px; }.mj-seats { gap: 7px; }
 .mj-room-header h2 { font-size: 22px; }
 .mj-room-actions { gap: 6px; }
 #points-page .mj-room-header button { font-size: 12px; padding: 9px 10px; }
}

/* Ivory faces, engraved suit artwork and green resin backs. */
.mj-tile { position: relative; width: 42px; height: 60px; padding: 2px 2px 4px; border: 1px solid #d9cdae; border-bottom: 5px solid #386e59; border-radius: 5px; background: linear-gradient(110deg,#fffef6 5%,#f8f2de 72%,#e9dfc4); box-shadow: inset 1px 1px 1px #fff, inset -1px -1px 2px #cfc3a5, 0 2px 2px #092a2440; }
.mj-tile svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 .3px .2px #654b3520); }
.mj-hidden { border-color: #d8ceb5; border-bottom-color: #315c4c; padding: 3px; background: #eee8d5; }
.mj-tile-back { display: block; width: 100%; height: 100%; border-radius: 2px; border: 1px solid #154532; background: repeating-linear-gradient(45deg,#36705a 0 1px,#2c614d 1px 3px); box-shadow: inset 0 0 0 2px #498269; }
.mj-table-scene { --river-tile: 24px; position: relative; height: 510px; margin-top: 16px; border: 9px solid #5f3924; border-radius: 30px; background-color: #185647; background-image: radial-gradient(ellipse at 50% 40%,#31876a77,transparent 70%),repeating-radial-gradient(circle at 20% 30%,#ffffff06 0 1px,#00000005 1px 3px); box-shadow: inset 0 0 0 3px #997450,inset 0 0 35px #082a24aa,0 5px 0 #382317,0 9px 16px #29241620; isolation: isolate; }
.mj-felt-line { position: absolute; inset: 12px; border: 1px solid #d4c29328; border-radius: 16px; pointer-events: none; }
.mj-table-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 84px; height: 88px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 1px solid #b3aa7850; border-radius: 15px; background: linear-gradient(145deg,#133e35,#0a2b26); box-shadow: 0 2px 5px #05251e55,inset 0 1px 1px #ffffff20; color: #f0deb0; }
.mj-table-center b { font: 700 31px/1 STKaiti,KaiTi,serif; color: #dabc7f; }.mj-table-center span { font-size: 11px; }.mj-table-center small { color: #91b0a2; font-size: 10px; }
.mj-table-scene .mj-table-seat { position: absolute; z-index: 2; display: flex; flex-direction: column; align-items: center; width: 115px; padding: 7px 5px; border: 0; background: transparent; border-radius: 12px; text-align: center; color: #f9f2dc; overflow-wrap: normal; }
.mj-table-seat-0 { bottom: 10px; left: 50%; transform: translateX(-50%); }.mj-table-seat-2 { top: 8px; left: 50%; transform: translateX(-50%); }.mj-table-seat-1 { right: 7px; top: 50%; transform: translateY(-50%); }.mj-table-seat-3 { left: 7px; top: 50%; transform: translateY(-50%); }
.mj-table-scene .mj-table-seat strong { max-width: 100%; margin: 5px 0 0; font-size: 12px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mj-table-scene .mj-table-seat small,.mj-table-scene .mj-table-seat .mj-ready-state { margin: 3px 0 0; color: #bfd2c3; font-size: 10px; line-height: 1.3; }
.mj-table-scene .mj-player-avatar { position: relative; display: grid; place-items: center; width: 35px; height: 35px; margin: 0; border: 2px solid #bcac8055; border-radius: 50%; background: linear-gradient(145deg,#e8d6a6,#ac9863); color: #3a4631; font-size: 16px; box-shadow: 0 2px 4px #05251e55; }
.mj-player-avatar i { position: absolute; right: -10px; bottom: -3px; width: 18px; height: 18px; display: grid; place-items: center; font-style: normal; font-size: 10px; color: #e9d3a4; border: 1px solid #a59060; border-radius: 4px; background: #254b3e; }
.mj-table-scene .mj-active-seat .mj-player-avatar { border-color: #ffe294; box-shadow: 0 0 0 4px #f6d44e2b,0 0 18px #f6d44e44; }
.mj-table-scene .mj-active-seat strong { color: #ffe5a2; }
.mj-concealed { display: flex; gap: 1px; height: 13px; margin-top: 6px; max-width: 100%; }
.mj-concealed i { display: block; width: 5px; border: 1px solid #bbd3b0; border-bottom: 3px solid #e5e1c8; border-radius: 2px 2px 1px 1px; background: linear-gradient(90deg,#70a385,#407b5f); }
.mj-table-river { position: absolute; display: grid; grid-template-columns: repeat(6,var(--river-tile)); gap: 2px; z-index: 1; max-height: 84px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #bdd1b966 transparent; }
.mj-table-river .mj-tile { width: var(--river-tile); height: calc(var(--river-tile)*1.43); padding: 1px 1px 2px; border-radius: 2px; border-bottom-width: 2px; }
.mj-river-0 { left: 50%; bottom: 112px; transform: translateX(-50%); }
.mj-river-2 { left: 50%; top: 111px; transform: translateX(-50%) rotate(180deg); }
.mj-river-1 { right: 132px; top: 50%; grid-template-columns: repeat(3,var(--river-tile)); transform: translateY(-50%); max-height: 168px; }
.mj-river-3 { left: 132px; top: 50%; grid-template-columns: repeat(3,var(--river-tile)); transform: translateY(-50%); max-height: 168px; }
.mj-table-waiting .mj-table-center { width: 104px; height: 104px; }
.mj-public-melds { display: flex; flex-wrap: wrap; gap: 12px 18px; margin-top: 13px; padding: 12px; border-radius: 10px; background: #e7eee0; }
.mj-public-meld > span { font-size: 11px; color: #54614a; }.mj-public-meld .mj-melds { margin-top: 3px; }.mj-public-meld .mj-tile { width: 28px; height: 40px; }
.mj-hand-panel { padding: 15px 12px 10px; border: 1px solid #d4dcc8; border-radius: 12px; background: linear-gradient(#e7eddc,#d8e1cb); }
.mj-hand { justify-content: center; gap: 3px; padding: 16px 0 7px; }
#points-page .mj-hand button { max-width: 48px; min-height: 62px; transition: transform .12s ease; touch-action: manipulation; }
.mj-hand .mj-tile { width: 100%; height: 64px; }
.mj-hand button[aria-pressed=true] { transform: translateY(-10px); outline: 2px solid #d6a933; outline-offset: 2px; }
.mj-bonus .mj-tile { width: 42px; height: 60px; }
@media(max-width:700px) {
 .mj-table-scene { --river-tile: 15px; height: 414px; border-width: 6px; border-radius: 22px; margin-left: -5px; margin-right: -5px; }
 .mj-table-scene .mj-table-seat { width: 68px; padding: 5px 1px; }
 .mj-table-seat-0,.mj-table-seat-2 { width: 106px !important; }.mj-table-seat-1 { right: 3px; }.mj-table-seat-3 { left: 3px; }
 .mj-table-scene .mj-table-seat strong { font-size: 11px; }.mj-table-scene .mj-table-seat small { font-size: 9px; }
 .mj-table-scene .mj-player-avatar { width: 30px; height: 30px; font-size: 14px; }.mj-concealed { height: 11px; }.mj-concealed i { width: 3px; }
 .mj-table-center { width: 66px; height: 74px; border-radius: 12px; }.mj-table-center b { font-size: 25px; }.mj-table-center span { font-size: 10px; }
 .mj-river-0 { bottom: 93px; }.mj-river-2 { top: 97px; }.mj-river-1 { right: 74px; }.mj-river-3 { left: 74px; }
 .mj-table-river { max-height: 64px; }.mj-river-1,.mj-river-3 { max-height: 124px; }
 .mj-hand { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 10px 3px; padding: 15px 0 6px; }
 #points-page .mj-hand button { max-width: none; min-height: 52px; }.mj-hand .mj-tile { height: 54px; }
 .mj-hand-panel { padding-left: 8px; padding-right: 8px; }.mj-public-meld .mj-tile { width: 24px; height: 35px; }
}
@media(max-width:380px) {
 .mj-table-scene { --river-tile: 12px; }
 .mj-table-scene .mj-table-seat { width: 58px; }
 .mj-river-1 { right: 63px; }.mj-river-3 { left: 63px; }
 .mj-river-1,.mj-river-3 { grid-template-columns: repeat(2,var(--river-tile)); }
}

/* Exposed sets stay on the felt, in each seat's corner. */
.mj-table-melds { position: absolute; z-index: 2; width: calc(50% - 80px); max-width: 210px; max-height: 110px; overflow-y: auto; scrollbar-width: thin; color: #f3e7c9; }
.mj-table-melds-0 { left: 16px; bottom: 18px; }
.mj-table-melds-1 { right: 16px; bottom: 18px; }
.mj-table-melds-2 { right: 16px; top: 18px; }
.mj-table-melds-3 { left: 16px; top: 18px; }
.mj-meld-owner { display: block; font-size: 10px; line-height: 1.4; color: #cee0cd; }
.mj-table-melds .mj-melds { margin-top: 4px; gap: 5px; }
.mj-table-melds .mj-melds > span { flex-wrap: nowrap; position: relative; margin: 0; padding-top: 12px; }
.mj-table-melds .mj-melds > span > small { position: absolute; left: 0; top: 0; font-size: 9px; line-height: 11px; white-space: nowrap; }
.mj-table-melds .mj-tile { width: 20px; height: 29px; padding: 1px; }
.mj-announcement { display: block; font-size: 12px; color: #776126; }
.mj-announcement:empty { display: none; }
@media(max-width:700px) {
 .mj-table-melds { width: calc(50% - 62px); max-width: 122px; max-height: 128px; }
 .mj-table-melds-0,.mj-table-melds-3 { left: 8px; }.mj-table-melds-1,.mj-table-melds-2 { right: 8px; }
 .mj-table-melds-0,.mj-table-melds-1 { bottom: 14px; }.mj-table-melds-2,.mj-table-melds-3 { top: 14px; }
 .mj-table-melds .mj-tile { width: 14px; height: 20px; border-bottom-width: 2px; }
 .mj-table-melds .mj-melds { gap: 3px; }.mj-meld-owner { font-size: 9px; }
}
@media(max-width:700px) {
 .mj-table-melds .mj-melds > span { padding-top: 0; align-items: center; }
 .mj-table-melds .mj-melds > span > small { position: static; flex: 0 0 10px; width: 10px; margin: 0; line-height: 10px; white-space: normal; }
}

/* At settlement, expose every hand on the felt without a collapsed details step. */
.mj-table-scene.mj-table-revealed { height: auto; padding: 12px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; align-items: stretch; }
.mj-reveal-title { grid-column: 1 / -1; color: #f4df9f; text-align: center; font-size: 15px; font-weight: 600; margin: 0 0 2px; }
.mj-revealed-seat { min-width: 0; padding: 9px; border: 1px solid #92b8a750; border-radius: 12px; background: #0b382b85; }
.mj-revealed-winner { border-color: #e4c46a; background: #385338a8; }
.mj-revealed-heading { display: block; margin-bottom: 6px; color: #f8efd3; font-size: 13px; overflow-wrap: anywhere; }
.mj-revealed-heading strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mj-revealed-heading span { display: block; min-height: 14px; color: #d6d8b6; font-size: 10px; }
.mj-revealed-hand { display: grid; grid-template-columns: repeat(7,minmax(0,28px)); gap: 3px 2px; }
.mj-revealed-hand .mj-tile { width: 100%; height: auto; aspect-ratio: 34 / 49; padding: 1px; border-bottom-width: 3px; border-radius: 3px; }
.mj-revealed-melds { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; border-top: 1px solid #b0c6a830; padding-top: 5px; }
.mj-revealed-melds > div { display: flex; align-items: center; gap: 5px; }
.mj-revealed-melds small { color: #d6dfbe; font-size: 11px; }
.mj-revealed-melds > div > span { display: flex; gap: 1px; }
.mj-revealed-melds .mj-tile,.mj-revealed-winning .mj-tile { width: 20px; height: 29px; }
.mj-revealed-winning { display: flex; align-items: center; gap: 7px; margin-top: 8px; color: #f4df9f; font-size: 12px; }
@media(max-width:700px) {
 .mj-table-scene.mj-table-revealed { padding: 8px; gap: 8px; }
 .mj-revealed-seat { padding: 6px; }
 .mj-revealed-hand { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 4px 2px; }
 .mj-revealed-hand .mj-tile { width: 100%; height: auto; aspect-ratio: 34 / 49; }
 .mj-revealed-heading { font-size: 11px; }
 .mj-revealed-melds .mj-tile,.mj-revealed-winning .mj-tile { width: 15px; height: 22px; padding: 1px; border-bottom-width: 2px; }
}

.mj-voice-panel { margin: 12px 0; padding: 12px; border: 1px solid #d6dfcb; border-radius: 12px; background: #edf2e5; }
.mj-voice-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
#points-page .mj-voice-panel button { min-height: 38px; padding: 9px 12px; border-radius: 9px; font-size: 12px; }
#points-page .mj-voice-panel button:not(.primary) { background: #dde4d5; color: #35442d; }
.mj-voice-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.mj-voice-hint { margin: 8px 0 0; font-size: 12px; line-height: 1.6; color: #627154; overflow-wrap: anywhere; }

@media(max-width:380px) {
 .mj-revealed-hand { grid-template-columns: repeat(5,minmax(0,1fr)); }
}

.mj-dealer-meta { display: block; margin-top: 4px; font-size: 12px; color: #87681e; }
.mj-dealer-badge { position: absolute; left: -10px; top: -6px; display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid #e8bf46; border-radius: 50%; background: #f7d96d; color: #554018; font: normal 700 11px/1 sans-serif; }
.mj-dice { display: flex; justify-content: center; align-items: center; gap: 5px; }
.mj-die { display: grid; grid-template-columns: repeat(3,1fr); grid-template-rows: repeat(3,1fr); gap: 2px; width: 26px; height: 26px; padding: 4px; border: 1px solid #d7cdb3; border-radius: 5px; background: linear-gradient(135deg,#fffdf4,#e9dfc3); box-shadow: 0 2px 0 #b5a37a,0 3px 5px #0005; }
.mj-die i { border-radius: 50%; background: transparent; }.mj-die .mj-dot-on { background: #243f36; }.mj-die-red .mj-dot-on { background: #c3342b; }
.mj-dice-rolling .mj-die { animation: mj-dice-toss .32s ease-in-out infinite alternate; }.mj-dice-rolling .mj-die:nth-child(2) { animation-delay: -.16s; }
.mj-reveal-dice { grid-column: 1 / -1; }
@keyframes mj-dice-toss { from { transform: translateY(-4px) rotate(-24deg); } to { transform: translateY(3px) rotate(26deg); } }
@media(max-width:700px) { .mj-die { width: 22px; height: 22px; padding: 3px; gap: 1px; } }
@media(prefers-reduced-motion:reduce) { .mj-dice-rolling .mj-die { animation: none; } }

.mj-turn-anchor { position: absolute; left: calc(100% - 8px); top: 38px; width: 86px; height: 64px; pointer-events: none; }
.mj-turn-notice { pointer-events: none; position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #594000; }
.mj-turn-notice[hidden] { display: none; }
.mj-turn-notice strong, .mj-table-scene .mj-turn-notice strong { margin: 0; max-width: none; padding: 3px 13px; border-radius: 20px; background: #ffe37b; font-size: 13px; line-height: 22px; color: #594000; box-shadow: 0 2px 6px #453b1c18; }
.mj-turn-arrow { width: 32px; height: 32px; fill: #ffcc28; stroke: #855d00; stroke-width: 1.5; stroke-linejoin: round; filter: drop-shadow(0 2px 2px #453b1c24); animation: mj-turn-bounce .8s ease-in-out infinite; }
@keyframes mj-turn-bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(7px); } }
@media (prefers-reduced-motion: reduce) { .mj-turn-arrow { animation: none; } }

.game-catalog { margin: 22px 0; }
.game-catalog[hidden],#mahjong-section[hidden] { display: none; }
.game-catalog-heading,.game-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0; }
.game-catalog-heading h2,.game-section-heading h2 { margin: 0; font-size: 20px; }
.game-catalog-heading>span { padding: 5px 14px; border-radius: 20px; background: #e5eee4; color: #356345; font-size: 13px; }
.game-catalog-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,320px),1fr)); gap: 16px; }
#points-page .game-entry { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; width: 100%; padding: 22px; border: 1px solid #ccddce; border-radius: 18px; background: linear-gradient(120deg,#eef5e9,#fff9dc); text-align: left; color: #263e30; }
.game-entry:hover { box-shadow: 0 5px 18px #254b3e18; }
.game-entry-icon { display: grid; place-items: center; width: 76px; height: 84px; border-radius: 18px; background: #285f49; flex-shrink: 0; }
.game-entry-icon .mj-tile { width: 43px; height: 62px; transform: rotate(-9deg); }
.game-entry-copy { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 150px; }
.game-entry-copy strong { font-size: 23px; }.game-entry-copy>span { font-size: 14px; }.game-entry-copy small { font-size: 12px; color: #627262; line-height: 1.6; }
.game-entry-go { padding: 10px 16px; border-radius: 10px; background: #f6d44e; color: #493d16; font-size: 14px; }
#mahjong-section { scroll-margin-top: 20px; }
@media(max-width:480px) { #points-page .game-entry { padding: 16px; gap: 12px; }.game-entry-go { margin-left: auto; }.game-section-heading h2 { font-size: 18px; }.game-section-heading button { padding: 10px; } }

[data-game-section][hidden] { display: none !important; }
[data-game-section] { scroll-margin-top: 20px; }
.game-entry-icon.game-entry-farm { background: #dae8b5; }.game-farm-icon { font-size: 48px; }
.farm-game { color: #334737; margin: 18px 0 28px; }
.farm-hero { position: relative; min-height: 220px; overflow: hidden; border-radius: 20px; background: #e7eed7; }
.farm-scenery { position: absolute; bottom: 0; width: 100%; height: 190px; }
.farm-hero-copy { position: relative; padding: 26px 28px 85px; }
.farm-eyebrow { font-size: 12px; letter-spacing: 2px; color: #5e7952; }
.farm-hero h2 { font-size: 30px; margin: 8px 0; }.farm-hero p { font-size: 13px; margin: 0 0 16px; }
.farm-level { background: #fff9de; padding: 6px 12px; border-radius: 16px; font-size: 12px; }
.farm-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0 8px; }
.farm-toolbar>div { display: flex; flex-direction: column; gap: 4px; }.farm-toolbar span { font-size: 12px; color: #74816a; }.farm-toolbar strong { font-size: 26px; }
.farm-intro { margin: 5px 0 18px; font-size: 12px; color: #76816e; line-height: 1.8; }
.farm-tabs { display: flex; gap: 6px; padding: 5px; border-radius: 14px; background: #e9eee2; }
#points-page .farm-tabs button { flex: 1; padding: 12px 6px; background: transparent; border: 0; border-radius: 10px; color: #617252; font-size: 14px; }
#points-page .farm-tabs button[aria-pressed=true] { background: #fffdf2; color: #355536; box-shadow: 0 2px 6px #2e4b3012; font-weight: 600; }
.farm-content { padding-top: 20px; }.farm-section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.farm-game h3 { font-size: 17px; margin: 0 0 8px; }.farm-game h3 small { font-size: 12px; font-weight: 400; color: #77856a; }.farm-section-title p,.farm-seed-shop p { font-size: 12px; line-height: 1.7; margin: 0; color: #78836e; }.farm-section-title>button { flex-shrink: 0; }
.farm-plots { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; padding: 18px; border: 1px solid #ced6b0; border-radius: 20px; background: #dce5c1; }
#points-page .farm-plot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 174px; padding: 12px 6px; border: 2px solid #b09163; border-radius: 14px; background: repeating-linear-gradient(170deg,#987144 0px,#987144 19px,#90673d 20px,#90673d 23px); color: #fff4d5; box-shadow: 0 4px 0 #755535; }
#points-page .farm-plot:disabled { opacity: 1; cursor: default; }
#points-page .farm-ripe { border-color: #ffe078; box-shadow: 0 4px 0 #866431,0 0 0 3px #ffe07844; }
.farm-plot-art { font-size: 46px; line-height: 1.3; filter: drop-shadow(0 3px 2px #50392350); }.farm-plot strong { font-size: 13px; line-height: 1.4; }.farm-plot small { font-size: 11px; line-height: 1.5; }
#points-page .farm-expand { background: #e8edcf; color: #71805a; border: 2px dashed #a9b988; box-shadow: none; }.farm-expand .farm-plot-art { filter: none; font-weight: 300; }
.farm-seed-shop { margin-top: 26px; }.farm-crops { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-top: 14px; }
#points-page .farm-crop { position: relative; display: flex; align-items: center; flex-direction: column; gap: 5px; padding: 15px 7px; border: 1px solid #dce3cf; border-radius: 12px; background: #fffdf5; color: #536249; }
#points-page .farm-crop[aria-pressed=true] { border: 2px solid #789758; background: #f2f6df; padding: 14px 6px; }.farm-crop>span { font-size: 30px; }.farm-crop strong { font-size: 13px; }.farm-crop small { font-size: 11px; }.farm-crop b { font-size: 10px; font-weight: 400; padding: 3px 7px; border-radius: 10px; background: #e1eac6; }
.farm-barn article { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding: 18px 0; border-bottom: 1px solid #e3e8d8; }.farm-barn-icon { font-size: 36px; }.farm-barn article>div { flex: 1; }.farm-barn p { font-size: 12px; color: #7a866f; margin: 6px 0 0; }.farm-barn strong { font-size: 14px; }
.farm-empty,.farm-pet-home { padding: 30px 20px; border-radius: 18px; background: #f1f3e4; text-align: center; }.farm-empty>span { font-size: 50px; }.farm-empty h3 { margin-top: 16px; }.farm-empty p,.farm-pet-home p { font-size: 13px; color: #74816b; line-height: 1.8; }.farm-pet-art { font-size: 82px; margin: 10px 0 18px; }.farm-pet-home small { display: block; max-width: 400px; margin: 18px auto 0; font-size: 12px; color: #849079; line-height: 1.8; }.farm-adopt { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.farm-status { min-height: 20px; font-size: 13px; line-height: 1.7; color: #4d7048; margin: 14px 0; }.farm-help { font-size: 12px; line-height: 1.8; color: #7a866f; }.farm-help summary { cursor: pointer; color: #536b47; }.farm-loading { padding: 35px; text-align: center; }
@media(max-width:600px) { .farm-plots { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 12px; gap: 12px 10px; }.farm-crops { grid-template-columns: repeat(2,minmax(0,1fr)); }.farm-hero-copy { padding: 22px 18px 85px; }.farm-toolbar button { padding: 10px; font-size: 12px; }.farm-section-title { flex-wrap: wrap; }.farm-tabs button { white-space: nowrap; }.farm-barn article>button { margin-left: auto; } }

#points-page .points-entry-card { display: flex; align-items: center; gap: 16px; width: 100%; margin: 20px 0 26px; padding: 20px 22px; border: 1px solid #eedfb1; border-radius: 18px; background: linear-gradient(115deg,#fffae9,#fff1ba); color: #4a412b; text-align: left; }
.points-entry-card:hover { border-color: #d9b844; box-shadow: 0 4px 15px #70561e0d; }.points-entry-symbol { flex-shrink: 0; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: #f7d966; color: #886319; font-size: 29px; }
.points-entry-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }.points-entry-copy>strong { font-size: 16px; }.points-entry-copy small { font-size: 11px; color: #8a7e5f; line-height: 1.6; }.points-entry-copy small b { font-weight: 500; }
.points-entry-total { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; flex-shrink: 0; font-size: 12px; }.points-entry-total>b { font-size: clamp(20px,3vw,29px); font-variant-numeric: tabular-nums; }.points-entry-total>span { font-size: 11px; color: #8c7741; }
.points-inner-page { max-width: 800px !important; }.points-inner-heading { margin-bottom: 24px; }.points-inner-heading h1 { margin: 22px 0 8px; font-size: 27px; color: #343f2e; }.points-inner-heading p { margin: 0; font-size: 13px; color: #91967e; }
#points-page .points-back { padding: 9px 14px; border: 0; border-radius: 10px; background: #f5d857; font-size: 13px; color: #4b4224; }
#points-page .points-wallet-summary { display: block; padding: 25px; background: linear-gradient(125deg,#fce69a,#fff3c5); border: 1px solid #efdb9a; border-radius: 22px; }
.points-wallet-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #82713c; font-size: 13px; }.points-wallet-top .points-refresh { background: #ffffff65; border: 1px solid #e8dca9; padding: 7px 13px; border-radius: 9px; color: #786638; }
.points-wallet-summary #points-balance { font-size: clamp(34px,7vw,48px); line-height: 1.3; margin: 8px 0 12px; overflow-wrap: anywhere; color: #493d25; }.points-wallet-member { margin: 0 0 22px; color: #948450; font-size: 12px; overflow-wrap: anywhere; }
.points-wallet-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-top: 1px solid #ddca8c70; padding-top: 18px; }.points-wallet-stats>div+div { padding-left: 18px; border-left: 1px solid #ddca8c70; }.points-wallet-stats span { font-size: 12px; color: #978653; }.points-wallet-stats b { display: block; margin-top: 6px; font-size: 22px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.points-panel-nav { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin: 22px 0 10px; }
#points-page .points-panel-nav button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 4px; border: 1px solid transparent; border-radius: 13px; background: transparent; font-size: 12px; color: #747d66; }
.points-panel-nav button>span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: #edf0e3; color: #728255; font-size: 25px; line-height: 1; }
#points-page .points-panel-nav button[aria-pressed=true] { border-color: #e9d898; background: #fff9e7; color: #786329; }.points-panel-nav button[aria-pressed=true]>span { background: #f8df85; color: #786329; }
[data-point-content][hidden] { display: none !important; }.points-inner-note { padding: 10px 4px; line-height: 1.8; font-size: 12px; }.points-inner-page #points-notice:empty { display: none; }.points-inner-page .points-card { margin-top: 12px; border-color: #e5e8da; border-radius: 18px; }
@media(max-width:480px) { #points-page .points-entry-card { gap: 10px; padding: 17px 14px; flex-wrap: wrap; }.points-entry-symbol { width: 39px; height: 39px; border-radius: 12px; font-size: 24px; }.points-entry-copy { min-width: 150px; }.points-entry-copy>strong { font-size: 15px; }.points-entry-total { margin-left: auto; }.points-inner-heading h1 { font-size: 24px; }#points-page .points-wallet-summary { padding: 20px; }.points-panel-nav { gap: 3px; } }

/* Farm life stages and animated companions. */
.farm-rule-note { padding: 13px 15px; margin: 10px 0 18px; border: 1px solid #e9d6a8; border-radius: 13px; background: #fff7df; color: #7b6334; font-size: 12px; line-height: 1.8; }.farm-rule-note p { margin: 5px 0 0; }
.farm-garden { position: relative; }.farm-v2 .farm-plots { align-items: stretch; padding-bottom: 32px; }
#points-page .farm-v2 .farm-plot { min-height: 265px; justify-content: flex-start; }.farm-v2 .farm-plot p { font-size: 11px; margin: 3px 0; line-height: 1.6; text-align: center; }
.farm-v2 .farm-plot>button { font-size: 12px; padding: 8px 10px; border-radius: 8px; margin-top: auto; }.farm-empty-sprout { font-size: 60px; font-weight: 300; opacity: .6; margin: 18px 0; }
.farm-crop-svg { width: 112px; height: 118px; display: block; flex-shrink: 0; overflow: visible; }.farm-crop .farm-crop-svg { width: 68px; height: 72px; }.farm-barn-icon .farm-crop-svg { width: 55px; height: 60px; }
.farm-plant-sway { transform-origin: 60px 108px; animation: farm-plant-sway 4.5s ease-in-out infinite; }.farm-blossom { transform-box: fill-box; transform-origin: center; }.farm-growth { width: 75%; height: 5px; border: none; border-radius: 6px; background: #ffffff40; accent-color: #c9dc87; }.farm-growth::-webkit-progress-bar { background: #ffffff40; border-radius: 6px; }.farm-growth::-webkit-progress-value { background: #c9dc87; border-radius: 6px; }
.farm-care-buttons { display: flex; justify-content: center; gap: 6px; width: 100%; }.farm-care-buttons button { padding: 7px 6px; font-size: 11px; border: 0; background: #edf1d8; color: #4b603f; border-radius: 7px; }.farm-care-buttons button:first-child { background: #d8edf0; color: #356577; }.farm-care-buttons button:disabled { opacity: .65; }
.farm-care-alert { color: #ab4b30 !important; font-weight: 600; }.farm-soil .farm-care-alert { color: #fff1c5 !important; background: #763e2c60; padding: 4px 6px; border-radius: 7px; }.farm-next-care { color: #e8efb6; }
#points-page .farm-withered { filter: saturate(.6); border-color: #a59479; background: #8c7b63; }.farm-text-button { background: #fff4d524; color: #fff5df; border: 1px solid #fff4d538; }
.farm-buy-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding: 18px; margin-top: 15px; border: 1px solid #d8dfc7; border-radius: 14px; background: #f1f5e4; }.farm-buy-bar>div:first-child { flex: 1; min-width: 140px; }.farm-buy-bar strong { display: block; font-size: 14px; }.farm-buy-bar small { display: block; font-size: 11px; margin-top: 5px; color: #798268; }.farm-buy-bar>small { width: 100%; }.farm-quantity { display: flex; align-items: end; gap: 5px; }.farm-quantity button { width: 34px; height: 36px; padding: 0; border: 1px solid #ccd7b5; background: #fff; border-radius: 8px; }.farm-qty-label { display: flex; flex-direction: column; gap: 4px; font-size: 10px; }.farm-qty-label input { width: 75px; height: 36px; padding: 5px; text-align: center; border: 1px solid #ccd7b5; border-radius: 8px; }
.farm-pet-walkers { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: 20px; }.farm-walker { position: absolute; top: 35%; left: 5%; --farm-walker-size: 120px; width: var(--farm-walker-size); --farm-walk-duration: 56s; --farm-walk-delay: 0s; animation: farm-wander var(--farm-walk-duration) linear var(--farm-walk-delay) infinite; }.farm-walker .farm-pet-svg { width: 100%; height: auto; filter: drop-shadow(0 3px 3px #27493744); }.walker-1 { --farm-walk-delay: -6s; --farm-walk-duration: 66s; }.walker-2 { --farm-walk-delay: -12s; --farm-walk-duration: 74s; }.walker-3 { --farm-walk-delay: -18s; --farm-walk-duration: 62s; }.walker-4 { --farm-walk-delay: -22s; --farm-walk-duration: 80s; }.walker-5 { --farm-walk-delay: -25s; --farm-walk-duration: 70s; }
.farm-pet-svg { width: 130px; height: 110px; display: block; overflow: visible; transform-origin: center bottom; }.farm-pet-svg.pet-baby { transform: scale(.7); }.farm-pet-svg.pet-young { transform: scale(.86); }.farm-pet-svg.pet-dead { filter: grayscale(1); opacity: .5; }
.pet-tail { transform-origin: 98px 70px; animation: farm-tail 1.5s ease-in-out infinite; }.pet-eyes { transform-origin: 43px 44px; animation: farm-blink 5s linear infinite; }.pet-body-bob { animation: farm-bob 2.6s ease-in-out infinite; }.pet-head { transform-origin: 44px 70px; animation: farm-head 4s ease-in-out infinite; }.farm-walker .pet-leg-a { transform-origin: 65px 80px; animation: farm-step .85s ease-in-out infinite alternate; }.farm-walker .pet-leg-b { transform-origin: 80px 82px; animation: farm-step .85s ease-in-out infinite alternate-reverse; }
.pet-dead * { animation: none !important; }.farm-pet-card { display: flex; flex-wrap: wrap; align-items: center; gap: 15px; margin-bottom: 15px; padding: 18px; background: #f4f5e8; border: 1px solid #dde4cd; border-radius: 18px; }.farm-pet-portrait { display: grid; place-items: center; min-height: 125px; }.farm-pet-description { flex: 1; min-width: 210px; }.farm-pet-description h3 { margin: 0; }.farm-pet-description h3>span { font-size: 11px; font-weight: 400; background: #e3ebce; border-radius: 10px; padding: 4px 8px; }.farm-pet-description p { font-size: 12px; line-height: 1.7; color: #7a846f; margin: 10px 0; }.farm-pet-stages { display: flex; flex-wrap: wrap; gap: 5px; }.farm-pet-stages span { padding: 4px 6px; border-radius: 6px; font-size: 10px; color: #8e9783; background: #e9eddf; }.farm-pet-stages .active { background: #dbe8bf; color: #4f6c39; }.farm-pet-actions { display: flex; flex-wrap: wrap; gap: 8px; }.farm-pet-actions button { padding: 9px 10px; font-size: 12px; }
.farm-pet-shop { margin-top: 28px; }.farm-pet-products { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }.farm-pet-products article { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 15px 10px; border: 1px solid #dce3cc; border-radius: 15px; background: #fffdf5; text-align: center; }.farm-pet-products small { font-size: 11px; line-height: 1.7; color: #7c866e; }.farm-pet-products button { margin-top: auto; font-size: 12px; padding: 10px; }
.farm-gift-form { margin-top: 18px; padding: 15px; border: 1px solid #d6dfbd; border-radius: 12px; background: #fffdf4; }.farm-gift-form h4 { margin: 0 0 12px; }.farm-gift-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; }.farm-gift-form input { min-width: 0; width: 100%; padding: 10px; border: 1px solid #cfd8bf; border-radius: 8px; box-sizing: border-box; }.farm-gift-form button { margin: 9px 7px 0 0; padding: 9px 11px; font-size: 12px; }
@keyframes farm-plant-sway { 0%,100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@keyframes farm-tail { 0%,100% { transform: rotate(-8deg); } 50% { transform: rotate(13deg); } }
@keyframes farm-blink { 0%,43%,47%,100% { transform: scaleY(1); } 45% { transform: scaleY(.1); } }
@keyframes farm-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes farm-head { 0%,100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes farm-step { from { transform: rotate(-10deg); } to { transform: rotate(10deg); } }
@keyframes farm-wander {
 0%,100% { left:3%;top:28%;animation-timing-function:ease-in-out; }
 23%,27% { left:min(72%,calc(100% - var(--farm-walker-size) - 8px));top:38%;animation-timing-function:ease-in-out; }
 48%,52% { left:12%;top:74%;animation-timing-function:ease-in-out; }
 73%,77% { left:min(70%,calc(100% - var(--farm-walker-size) - 8px));top:85%;animation-timing-function:ease-in-out; }
 97% { left:3%;top:28%; }
}
@media(max-width:600px) { .farm-v2 .farm-plots { gap: 12px 8px; padding: 10px 8px 24px; }#points-page .farm-v2 .farm-plot { padding: 10px 5px; }.farm-crop-svg { width: 93px; height: 103px; }.farm-pet-products { grid-template-columns: repeat(2,minmax(0,1fr)); }.farm-pet-products .farm-pet-svg { width: 105px; height: 96px; }.farm-pet-card { padding: 14px; justify-content: center; }.farm-pet-description { min-width: 0; width: 100%; flex-basis: 100%; }.farm-walker { --farm-walker-size: 90px; }.farm-care-buttons { gap: 4px; }.farm-care-buttons button { font-size: 10px; padding: 7px 4px; }.farm-plot>strong { font-size: 12px; }.farm-buy-bar { padding: 14px; gap: 10px; } }
@media(prefers-reduced-motion:reduce) { .farm-plant-sway,.farm-walker,.farm-pet-svg * { animation: none !important; }.walker-1 { left: 25%; }.walker-2 { left: 45%; }.walker-3 { top: 65%; }.walker-4 { left: 25%; top: 65%; }.walker-5 { left: 45%; top: 65%; } }
.game-niuniu-icon { position: relative; font-size: 52px; color: #ffe8a7; line-height: 1; }.game-niuniu-icon b { position: absolute; left: 15px; top: 18px; color: #325843; font-size: 19px; }
.nn-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0; }.nn-heading h2 { margin: 0 0 7px; font-size: 24px; color: #34523c; }.nn-heading p,.nn-heading>span { font-size: 12px; color: #7c846d; }.nn-heading strong { color: #506d3b; }
.nn-table { padding: 28px 20px; border: 8px solid #876647; border-radius: 28px; background: radial-gradient(ellipse at center,#327b63,#184c3d); box-shadow: inset 0 0 0 3px #c7ac7850,inset 0 0 55px #08291e55; text-align: center; color: #eee7ce; }
.nn-seat-label { display: inline-block; margin-bottom: 16px; padding: 6px 14px; background: #153d3275; border-radius: 20px; color: #f4dea0; font-size: 13px; }.nn-hand { display: flex; gap: 9px; justify-content: center; align-items: center; }.nn-card { position: relative; display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 65px; height: 96px; border-radius: 7px; border: 1px solid #d6d4be; background: #fffdf2; color: #253e39; box-shadow: 0 4px 0 #c0baa0,0 5px 8px #08291e60; box-sizing: border-box; }.nn-red { color: #c85b4b; }.nn-card>b { font-size: 32px; font-family: Georgia,serif; }.nn-card-corner { position: absolute; left: 5px; top: 4px; font-size: 15px; font-weight: 700; line-height: 1.05; }.nn-card-corner small { display: block; font-size: 12px; }.nn-card-bottom { position: absolute; bottom: 5px; right: 5px; transform: rotate(180deg); font-size: 12px; }.nn-card-back { color: #dcc080; border: 3px solid #f5e7c5; background: repeating-linear-gradient(45deg,#355b73 0,#355b73 4px,#2b4d63 5px,#2b4d63 7px); }.nn-card-back>span { font-size: 38px; opacity: .75; }
#points-page .nn-select-card { border: 0; padding: 0; background: none; border-radius: 7px; color: inherit; transition: transform .15s; }.nn-select-card:disabled { opacity: 1; }.nn-select-card[aria-pressed=true] { transform: translateY(-10px); outline: 3px solid #f0d264; outline-offset: 2px; }.nn-hand-label { display: block; margin: 15px 0 0; font-size: 15px; color: #efdb9b; }.nn-table-center { min-height: 95px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 17px 0; }.nn-table-center>span,.nn-table-center small { font-size: 11px; color: #aecdba; }.nn-table-center strong { font-size: 17px; }.nn-table-center .nn-win { color: #ffe384; }.nn-table-center .nn-lose { color: #e4d7c8; }.nn-table-center .nn-table-mark { font-size: 37px; font-weight: 700; opacity: .35; }.nn-selection { min-height: 20px; margin: 17px 0 0; font-size: 12px; color: #d3ddbc; line-height: 1.7; }
.nn-controls { display: flex; align-items: end; justify-content: center; gap: 12px; margin: 20px 0 10px; }.nn-controls label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: #7b846f; }.nn-controls select { padding: 11px; border: 1px solid #d6dfc8; border-radius: 9px; background: #fff; }.nn-controls button { min-height: 42px; }.nn-note,.nn-status,.nn-rules { font-size: 12px; line-height: 1.8; color: #7b866f; }.nn-status { color: #aa6142; }.nn-rules { margin: 18px 0 28px; }.nn-rules summary { cursor: pointer; color: #4e6840; }
@media(max-width:480px) { .nn-table { padding: 22px 7px; border-width: 6px; border-radius: 20px; }.nn-hand { gap: 5px; }.nn-card { width: clamp(40px,12vw,56px); height: 76px; }.nn-card>b { font-size: 25px; }.nn-card-corner { font-size: 12px; left: 3px; }.nn-card-corner small { font-size: 10px; }.nn-card-bottom { font-size: 10px; right: 3px; }.nn-table-center strong { font-size: 14px; }.nn-seat-label { font-size: 12px; }.nn-selection { font-size: 11px; } }
body.mj-game-open { overflow: hidden; }
#mahjong-section.mj-game-view { position: fixed; inset: 0; z-index: 400; width: 100%; height: 100dvh; box-sizing: border-box; padding: 0 max(12px,env(safe-area-inset-right)) 20px max(12px,env(safe-area-inset-left)); overflow: auto; overscroll-behavior: contain; background: #f5f7ed; scroll-margin: 0; }
.mj-game-view>.game-section-heading { position: sticky; top: 0; z-index: 15; margin: 0 auto 10px; padding: 10px 0; background: #f5f7edf5; border-bottom: 1px solid #dce4ce; flex-wrap: wrap; }.mj-game-view>.game-section-heading h2 { margin-right: auto; font-size: 16px; }.mj-game-view>.game-section-heading>button { padding: 9px 11px; font-size: 12px; }.mj-view-switch { display: flex; gap: 4px; }.mj-view-switch button { padding: 9px 12px; font-size: 12px; border: 1px solid #d4b542; }.mj-view-switch button[aria-pressed=true] { box-shadow: inset 0 0 0 2px #8e7429; font-weight: 700; }.mj-view-switch button[aria-pressed=false] { background: #ffefb4; }
.mj-game-view[data-orientation=portrait]>#mahjong-area,.mj-game-view[data-orientation=portrait]>.game-section-heading { max-width: 720px; margin-left: auto; margin-right: auto; }
.mj-game-view #mahjong-area { margin-top: 0; }.mj-game-view .mj-room { margin-top: 0; }
@media(orientation:portrait) { #mahjong-section.mj-game-view[data-orientation=landscape] { inset: auto; top: 50%; left: 50%; width: 100dvh; height: 100dvw; transform: translate(-50%,-50%) rotate(90deg); transform-origin: center; } }
/* The entire game viewport is the table; controls sit along its edges. */
#mahjong-section.mj-table-mode { display: flex; flex-direction: column; overflow: hidden; padding: 0 max(8px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left)); background: radial-gradient(ellipse at 50% 40%,#327e64,#103e34); color: #f5ebcf; }
#mahjong-section.mj-table-mode>.game-section-heading { flex: none; max-width: none; width: 100%; margin: 0; padding: 5px 0; background: transparent; border-color: #e0cf9533; }
#mahjong-section.mj-table-mode>.game-section-heading h2 { color: #f5ebcf; font-size: 14px; }
#mahjong-section.mj-table-mode #mahjong-area { flex: 1; min-height: 0; max-width: none; width: 100%; margin: 0; }
#mahjong-section.mj-table-mode .mj-room { position: relative; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-rows: auto minmax(0,1fr) auto auto auto; gap: 0 8px; box-shadow: none; }
.mj-table-mode .mj-room-header { grid-column: 1; grid-row: 1; display: flex; align-items: center; gap: 8px; margin: 0; padding: 5px 0; min-width: 0; }
.mj-table-mode .mj-room-header h2,.mj-table-mode .mj-dealer-meta { display: none; }
.mj-table-mode .mj-room-header p { color: #dfdfbf; font-size: 10px; margin: 0; }
.mj-table-mode .mj-room-actions { flex-direction: row; transform: none; width: auto; gap: 4px; flex-shrink: 0; }
#points-page .mj-table-mode .mj-room-actions button { min-height: 28px; padding: 5px 7px; font-size: 10px; }
.mj-table-mode .mj-voice-panel { grid-column: 2; grid-row: 1; margin: 0; padding: 5px 0; background: transparent; border: 0; color: #eee5c8; }
.mj-table-mode .mj-voice-row { font-size: 10px; gap: 4px; }
.mj-table-mode .mj-voice-hint { display: none; }
#points-page .mj-table-mode .mj-voice-panel button { min-height: 27px; font-size: 10px; padding: 5px 7px; }
.mj-table-mode .mj-voice-buttons { margin-top: 3px; gap: 3px; }
.mj-table-mode .mj-turn-status { position: absolute; left: 50%; top: 42px; transform: translateX(-50%); z-index: 4; max-width: 75%; margin: 0; padding: 3px 10px; background: #082e26b0; color: #ffedac; border: 0; border-radius: 15px; font-size: 11px; text-align: center; pointer-events: none; }
.mj-table-mode .mj-table-scene { grid-column: 1 / -1; grid-row: 2; min-height: 0; width: 100%; height: 100%; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; --river-tile: 22px; }
.mj-table-mode .mj-felt-line { inset: 20px 14px 4px; border-radius: 40px; }
.mj-table-mode .mj-table-seat-2 { top: 27px; }
.mj-table-mode .mj-table-seat-0 { bottom: 0; }
.mj-table-mode .mj-hand-panel { grid-column: 1 / -1; grid-row: 3; padding: 0 6px; margin: 0; background: transparent; border: 0; color: #f3e6bf; }
.mj-table-mode .mj-hand-panel>.points-row,.mj-table-mode .mj-hand-panel>.hint { display: none; }
.mj-table-mode .mj-hand { display: flex; padding: 12px 0 3px; gap: 3px; min-height: 0; }
#points-page .mj-table-mode .mj-hand button { max-width: 52px; min-height: 0; }
.mj-table-mode .mj-hand .mj-tile { height: auto; aspect-ratio: 36 / 50; }
.mj-table-mode .mj-hand-panel .mj-buttons { justify-content: center; margin: 5px 0; gap: 8px; }
.mj-table-mode .mj-hand-panel .mj-buttons:empty { display: none; }
.mj-table-mode .mj-buttons button { padding: 7px 16px; font-size: 13px; }
.mj-table-mode .mj-table-controls { grid-column: 1 / -1; grid-row: 4; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 5px 12px; padding: 5px; }
.mj-table-mode .mj-table-controls .hint { width: 100%; margin: 0; font-size: 10px; color: #c5d5bd; text-align: center; }
.mj-table-mode .mj-control-row { margin: 0; gap: 5px; }
.mj-table-mode .mj-status { grid-column: 1; grid-row: 5; margin: 0; font-size: 11px; color: #ffe4a5; }
.mj-table-mode .mj-table-info { grid-column: 2; grid-row: 5; font-size: 11px; align-self: end; color: #dbcba4; }
.mj-table-info>summary { cursor: pointer; padding: 5px; }
.mj-table-info>div { position: absolute; z-index: 20; inset: 42px 8px 30px; overflow: auto; padding: 20px; background: #fffdf2; color: #334b37; border-radius: 15px; box-shadow: 0 8px 40px #001b22aa; }
.mj-table-mode .mj-result { grid-row: 3; grid-column: 1 / -1; max-height: 150px; overflow: auto; padding: 10px; margin: 4px 0; font-size: 12px; color: #50471f; }
.mj-table-mode .mj-table-revealed { min-height: 0; overflow: auto; padding: 5px; }
.mj-table-mode .mj-room[data-phase=finished] .mj-turn-status { display: none; }
.mj-table-mode[data-orientation=landscape] .mj-hand { max-width: 850px; margin: auto; }
.mj-table-mode[data-orientation=landscape] .mj-hand .mj-tile { max-height: 58px; }
.mj-table-mode[data-orientation=landscape] .mj-table-seat { width: 85px; padding: 2px; }
.mj-table-mode[data-orientation=landscape] .mj-table-seat-2 { top: 20px; }
.mj-table-mode[data-orientation=landscape] .mj-player-avatar { width: 26px; height: 26px; font-size: 12px; }
.mj-table-mode[data-orientation=landscape] .mj-table-seat strong { margin-top: 2px; font-size: 10px; }
.mj-table-mode[data-orientation=landscape] .mj-table-seat small { font-size: 8px; }
.mj-table-mode[data-orientation=landscape] .mj-concealed { height: 8px; margin-top: 2px; }
.mj-table-mode[data-orientation=landscape] .mj-ready-state { font-size: 8px; }
.mj-table-mode[data-orientation=landscape] .mj-table-center { width: 62px; height: 62px; }
.mj-table-mode[data-orientation=landscape] .mj-river-0 { bottom: 70px; max-height: 46px; }
.mj-table-mode[data-orientation=landscape] .mj-river-2 { top: 88px; max-height: 46px; }
.mj-table-mode[data-orientation=landscape] .mj-river-1 { right: 100px; }
.mj-table-mode[data-orientation=landscape] .mj-river-3 { left: 100px; }
.mj-table-mode[data-orientation=landscape] .mj-room[data-phase=finished] { grid-template-columns: minmax(0,1fr) minmax(210px,28%); }
.mj-table-mode[data-orientation=landscape] .mj-table-revealed { grid-column: 1; grid-row: 2 / 4; }
.mj-table-mode[data-orientation=landscape] .mj-result { grid-column: 2; grid-row: 2 / 4; max-height: 100%; height: 100%; margin: 0; }
@media(max-width:700px) {
 .mj-table-mode[data-orientation=portrait] .mj-hand { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); max-width: 380px; margin: auto; gap: 5px 3px; }
 .mj-table-mode[data-orientation=portrait] .mj-hand .mj-tile { max-height: 49px; }
 .mj-table-mode[data-orientation=portrait] .mj-room-header { flex-wrap: wrap; gap: 3px; }
 .mj-table-mode .mj-voice-row>strong { display: none; }
 .mj-table-mode .mj-table-scene { --river-tile: 16px; }
 .mj-table-mode[data-orientation=portrait] .mj-table-seat { width: 65px; }
 .mj-table-mode[data-orientation=portrait] .mj-river-1 { right: 70px; }
 .mj-table-mode[data-orientation=portrait] .mj-river-3 { left: 70px; }
}

/* Seed purchasing stays in a compact, focused modal. */
.farm-seed-dialog { width: min(400px,calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 24px; border: 1px solid #e0e6d4; border-radius: 22px; background: #fffef8; text-align: center; color: #33452e; }
.farm-seed-dialog::backdrop { background: rgb(25 38 20 / 48%); }
.farm-seed-dialog .farm-seed-close { position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; padding: 0; border-radius: 50%; background: #f1f3e9; font-size: 24px; }
.farm-seed-preview svg { width: 90px; height: 90px; }
.farm-seed-dialog h3 { margin: 8px 0; font-size: 21px; }
.farm-seed-dialog p { font-size: 13px; color: #728069; margin: 10px 0; }
.farm-seed-dialog .farm-quantity { justify-content: center; gap: 12px; margin: 22px 0; }
.farm-seed-dialog .farm-qty-label { font-size: 13px; gap: 8px; }
.farm-seed-dialog .farm-qty-label input { font-size: 18px; width: 110px; height: 44px; }
.farm-seed-dialog .farm-quantity button { width: 44px; height: 44px; font-size: 21px; }
.farm-seed-total { display: flex; justify-content: space-between; align-items: center; padding: 15px; border-radius: 12px; background: #f0f4e5; font-size: 14px; }
.farm-seed-total strong { font-size: 22px; color: #476331; }
.farm-seed-dialog p.farm-seed-hint { color: #af4a31; min-height: 18px; }
.farm-seed-confirm { width: 100%; min-height: 46px; }
.farm-seed-dialog>small { display: block; margin-top: 14px; font-size: 11px; color: #7a856f; }
.farm-seed-preview { display: flex; justify-content: center; }
/* Keep central status and dice clear of the seats on short landscape screens. */
.mj-table-mode .mj-announcement { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.mj-table-mode[data-orientation=portrait] .mj-table-seat-2 { top: 50px; }
.mj-table-mode[data-orientation=landscape] .mj-turn-status { top: 5px; max-width: 32%; font-size: 10px; }
.mj-table-mode[data-orientation=landscape] .mj-table-seat-2 { top: 0; }
.mj-table-mode[data-orientation=landscape] .mj-table-seat-0 { left: 24%; bottom: 0; }
.mj-table-mode[data-orientation=landscape] .mj-table-center { width: 50px; height: 56px; }
.mj-table-mode[data-orientation=landscape] .mj-table-seat .mj-ready-state { display: none; }
.mj-table-mode[data-orientation=landscape] .mj-table-waiting .mj-ready-state { display: block; }
.mj-table-mode[data-orientation=landscape] .mj-river-2 { top: 68px; }
.nn-mode-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 15px; }.nn-mode-bar>div { display: flex; gap: 5px; }.nn-mode-bar button { padding: 9px 12px; font-size: 12px; }.nn-mode-bar button[aria-pressed=false].primary { background: #f5edcb; }.nn-mode-bar button[aria-pressed=true].primary { outline: 2px solid #ad8c21; outline-offset: -2px; }
.nn-room-lobby { background: #fffdf4; border: 1px solid #e6dfbf; border-radius: 18px; padding: 22px; }.nn-room-lobby p { line-height: 1.8; font-size: 13px; }.nn-room-lobby label { display: block; margin: 12px 0; }.nn-room-lobby select,.nn-room-lobby input { display: block; width: 100%; margin-top: 8px; padding: 12px; border: 1px solid #d8dec9; border-radius: 9px; font-size: 16px; }#nn-room-join { margin-top: 24px; border-top: 1px solid #e4e7d6; padding-top: 8px; }
.nn-multi-table { background: radial-gradient(ellipse,#2c8064,#123e34); border: 7px solid #6a4c30; border-radius: 24px; padding: 20px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px 15px; color: #fff3cb; }.nn-multi-seat { min-width: 0; text-align: center; padding: 10px 4px; border: 1px solid #bbd4b933; border-radius: 14px; }.nn-multi-seat>strong { display: block; font-size: 13px; }.nn-multi-seat .nn-hand { gap: 4px; margin: 14px 0; }.nn-multi-seat .nn-card { width: clamp(28px,5vw,62px); height: auto; aspect-ratio: 5 / 7; }.nn-multi-seat .nn-select-card { width: auto; }.nn-multi-seat .nn-select-card:disabled { opacity: 1 !important; }.nn-own-seat { background: #ffffef0b; border-color: #e9cb6b; }.nn-multi-seat .nn-hand-label { font-size: 11px; }.nn-room-result { text-align: center; padding: 18px 8px 0; font-size: 14px; }.nn-room-result strong { color: #6e5a17; font-size: 20px; }.nn-room-result p { font-size: 12px; }.nn-multi-game .nn-heading small { font-size: 12px; }
@media(max-width:600px){.nn-multi-table { padding: 10px; gap: 14px 5px; border-width: 4px; }.nn-multi-seat { padding: 10px 3px; }.nn-multi-seat .nn-card { width: clamp(22px,6vw,35px); }.nn-multi-seat .nn-hand { gap: 2px; }.nn-multi-seat .nn-card-corner { font-size: 10px; left: 2px; top: 2px; }.nn-multi-seat .nn-card-corner small { font-size: 8px; }.nn-multi-seat .nn-card>b { font-size: 16px; }.nn-multi-seat .nn-card-bottom { display: none; }.nn-multi-seat>strong { font-size: 11px; }.nn-seats-2 { grid-template-columns: 1fr; }.nn-seats-2 .nn-card { width: 44px; }.nn-multi-table .nn-own-seat { grid-column: 1 / -1; }.nn-multi-table .nn-own-seat .nn-card { width: 45px; }.nn-multi-table .nn-own-seat .nn-card-corner { font-size: 15px; }.nn-multi-table .nn-own-seat .nn-card>b { font-size: 24px; }}
/* Explicit face dimensions avoid intrinsic SVG sizing overflowing narrow tables. */
#points-page .mj-table-mode .mj-hand { display: grid; grid-template-columns: repeat(var(--mj-hand-columns,14),var(--mj-hand-width,32px)); justify-content: center; max-width: 100%; gap: 4px 3px; padding: 12px 0 3px; }
#points-page .mj-table-mode .mj-hand button { width: var(--mj-hand-width,32px); height: var(--mj-hand-height,44px); min-width: 0; min-height: 0; max-width: 100%; }
#points-page .mj-table-mode .mj-hand .mj-tile { width: 100%; height: var(--mj-hand-height,44px); max-height: none; aspect-ratio: auto; }
.mj-table-mode .mj-tile svg { min-width: 0; min-height: 0; overflow: hidden; }
.mj-table-mode .mj-table-revealed { grid-template-rows: auto repeat(2,minmax(0,1fr)); align-content: stretch; gap: 5px; }
.mj-table-mode .mj-revealed-seat { min-height: 0; padding: 5px; overflow: auto; }
.mj-table-mode .mj-revealed-hand { grid-template-columns: repeat(7,var(--mj-reveal-width,18px)); gap: 2px; max-width: 100%; }
.mj-table-mode .mj-revealed-hand .mj-tile { width: var(--mj-reveal-width,18px); height: var(--mj-reveal-height,25px); aspect-ratio: auto; }
.mj-table-mode .mj-revealed-heading { font-size: 10px; margin-bottom: 3px; }
.mj-table-mode .mj-revealed-heading span { font-size: 9px; min-height: 10px; }
.mj-table-mode .mj-revealed-melds .mj-tile { width: 13px; height: 18px; }
.mj-table-mode .mj-table-melds { max-height: 30%; }
/* Yellow controls retain dark, readable labels on the green game surface. */
.primary, .primary:hover, .primary:active, .primary:disabled,
.mobile-publish, .game-entry-go, .avatar-upload, #remove-avatar,
.connections-tabs button[aria-pressed=true], .conversation-menu [aria-pressed=true] { color: #000 !important; -webkit-text-fill-color: #000; text-shadow: none; }
.primary:disabled { opacity: 1; background: #d9ce9b; cursor: not-allowed; box-shadow: none; }
.mj-table-mode .mj-turn-anchor { left: calc(100% + 3px); top: 34px; width: 94px; height: 34px; z-index: 5; }
.mj-table-mode[data-orientation=landscape] .mj-turn-anchor { top: 12px; }
.mj-table-mode .mj-turn-notice { flex-direction: row; gap: 4px; justify-content: flex-start; }
.mj-table-mode .mj-turn-notice strong { flex: none; margin: 0; padding: 3px 8px; color: #000; -webkit-text-fill-color: #000; font-size: 12px; line-height: 22px; white-space: nowrap; background: #f6d44e; box-shadow: 0 2px 5px #082e2633; }
.mj-table-mode .mj-turn-arrow { flex: none; width: 22px; height: 26px; fill: #f6d44e; animation-name: mj-turn-nudge; }
@keyframes mj-turn-nudge { 0%,100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
#points-page button.primary:disabled { opacity: 1; background: #d9ce9b; }
/* Niuniu uses a full-window felt table in both orientations. */
body.nn-game-open { overflow: hidden; }
#niuniu-section.nn-game-view { position: fixed; inset: 0; z-index: 400; width: 100%; height: 100dvh; padding: max(4px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left)); display: flex; flex-direction: column; overflow: hidden; background: radial-gradient(ellipse at 50% 40%,#327e64,#103e34); color: #f5ebcf; }
#niuniu-section.nn-game-view[hidden] { display: none; }
.nn-game-view>.game-section-heading { flex: none; margin: 0; padding: 3px 0 7px; border-bottom: 1px solid #e3cd8833; gap: 6px; }
.nn-game-view>.game-section-heading h2 { margin: 0 auto 0 0; font-size: 14px; }
.nn-game-view>.game-section-heading button,.nn-view-switch button { padding: 8px 10px; font-size: 11px; }
.nn-view-switch { display: flex; gap: 4px; }.nn-view-switch [aria-pressed=true] { box-shadow: inset 0 0 0 2px #957717; }
.nn-game-view #niuniu-area { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.nn-game-view .nn-mode-bar { margin: 0; padding: 5px 0; flex: none; gap: 4px; }
.nn-game-view .nn-mode-bar button { padding: 6px 10px; font-size: 11px; }
.nn-game-view [data-nn-sound] { background: #f6d44e; color: #000; border-radius: 10px; }
.nn-game-view #niuniu-solo-area,.nn-game-view #niuniu-room-area { flex: 1; min-height: 0; position: relative; overflow: auto; }
.nn-game-view #niuniu-solo-area[hidden],.nn-game-view #niuniu-room-area[hidden] { display: none; }
.nn-game-view .nn-game,.nn-game-view .nn-multi-game { height: 100%; min-height: 0; display: flex; flex-direction: column; position: relative; background: none; border: 0; padding: 0; }
.nn-game-view .nn-heading { flex: none; height: auto; min-height: 28px; margin: 0; padding: 0 3px 5px; gap: 8px; color: #e8dfbd; font-size: 11px; }
.nn-game-view .nn-heading h2 { display: none; }.nn-game-view .nn-heading p { font-size: 10px; margin: 0; color: #e8dfbd; }.nn-game-view .nn-heading button { padding: 6px 9px; font-size: 11px; }
.nn-game-view .nn-table,.nn-game-view .nn-multi-table { flex: 1; min-height: 0; position: relative; width: 100%; height: auto; padding: 0; margin: 0; border: 1px solid #d4c29328; border-radius: 32px; background: none; box-shadow: none; display: block; }
.nn-game-view .nn-dealer,.nn-game-view .nn-player { position: absolute; left: 50%; transform: translateX(-50%); width: max-content; max-width: 100%; text-align: center; }
.nn-game-view .nn-dealer { top: 10px; }.nn-game-view .nn-player { bottom: 8px; }
.nn-game-view .nn-seat-label { font-size: 11px; margin: 0 0 10px; padding: 3px 10px; }
.nn-game-view .nn-hand { margin: 6px 0; gap: 4px; }
.nn-game-view .nn-card { width: var(--nn-face-w,45px); height: var(--nn-face-h,63px); aspect-ratio: auto; }
#points-page .nn-game-view .nn-select-card { width: var(--nn-face-w,45px); min-width: 0; flex: none; }
#points-page .nn-game-view .nn-select-card:disabled { opacity: 1; }
.nn-game-view .nn-hand-label,.nn-game-view .nn-selection { display: block; margin: 4px 0 0; font-size: 10px; color: #efddb0; }
.nn-game-view .nn-table-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); margin: 0; padding: 0; width: 90%; min-height: 0; pointer-events: none; }
.nn-game-view .nn-table-center strong { font-size: 14px; }.nn-game-view .nn-table-center small { font-size: 10px; }.nn-game-view .nn-table-mark { font-size: 32px; }
.nn-game-view .nn-controls { flex: none; margin: 6px 0 3px; gap: 6px; flex-wrap: wrap; justify-content: center; }
.nn-game-view .nn-controls button { padding: 8px 12px; font-size: 12px; min-height: 32px; }
.nn-game-view .nn-controls label { display: flex; align-items: center; gap: 5px; margin: 0; font-size: 11px; color: #e0d9ba; }
.nn-game-view .nn-controls select { width: auto; margin: 0; padding: 6px; font-size: 12px; }
.nn-game-view .nn-rules { flex: none; border: 0; padding: 0; margin: 0; font-size: 10px; text-align: right; color: #ead9aa; }
.nn-game-view .nn-rules>summary { padding: 5px; cursor: pointer; }
.nn-game-view .nn-rules>div { position: absolute; inset: 5px 5px 30px; z-index: 25; overflow: auto; background: #fffdf2; color: #334a38; text-align: left; border-radius: 15px; padding: 20px; box-shadow: 0 4px 25px #001e1c99; font-size: 13px; line-height: 1.8; }
.nn-game-view .nn-status:empty { display: none; }.nn-game-view .nn-status { margin: 0; font-size: 11px; }
.nn-game-view .nn-settlement-note { position: absolute; left: 2px; bottom: 4px; margin: 0; font-size: 9px; color: #d2d5b7; pointer-events: none; }
.nn-game-view .nn-multi-seat { position: absolute; min-width: 0; border: 0; padding: 0; border-radius: 0; background: none; max-width: 48%; }
.nn-game-view [data-nn-position="0"] { bottom: 8px; left: 50%; transform: translateX(-50%); max-width: 95%; }
.nn-game-view [data-nn-position="2"] { top: 8px; left: 50%; transform: translateX(-50%); max-width: 95%; }
.nn-game-view [data-nn-position="1"] { top: 50%; right: 8px; transform: translateY(-50%); }
.nn-game-view [data-nn-position="3"] { top: 50%; left: 8px; transform: translateY(-50%); }
.nn-game-view .nn-multi-seat>strong { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nn-game-view .nn-multi-seat .nn-card { width: var(--nn-other-w,28px); height: var(--nn-other-h,39px); }
.nn-game-view .nn-multi-seat.nn-own-seat .nn-card { width: var(--nn-face-w,45px); height: var(--nn-face-h,63px); }
.nn-game-view .nn-multi-seat .nn-card-corner { left: 3px; top: 3px; font-size: 10px; }.nn-game-view .nn-multi-seat .nn-card-corner small { font-size: 8px; }
.nn-game-view .nn-multi-seat .nn-card>b { font-size: 18px; }.nn-game-view .nn-multi-seat .nn-card-bottom { display: none; }
.nn-game-view .nn-multi-seat .nn-hand { padding-top: 7px; }.nn-game-view .nn-multi-seat .nn-hand-label { font-size: 9px; }
.nn-game-view .nn-room-result { flex: none; padding: 4px; font-size: 11px; }.nn-game-view .nn-room-result strong { color: #ffdf78; font-size: 14px; }.nn-game-view .nn-room-result p { font-size: 10px; margin: 2px 0 0; }
.nn-game-view .nn-room-lobby { max-width: 560px; margin: 10px auto; color: #334a38; }
@media(orientation:portrait) { #niuniu-section.nn-game-view[data-orientation=landscape] { inset: auto; top: 50%; left: 50%; width: 100dvh; height: 100dvw; transform: translate(-50%,-50%) rotate(90deg); transform-origin: center; } }
.nn-game-view[data-orientation=landscape] .nn-table-center { width: 32%; }.nn-game-view[data-orientation=landscape] .nn-dealer { top: 5px; left: 28%; }.nn-game-view[data-orientation=landscape] .nn-player { bottom: 5px; left: 72%; }
.nn-game-view[data-orientation=landscape] .nn-seat-label { margin-bottom: 3px; }.nn-game-view[data-orientation=landscape] .nn-table-center { left: 50%; }
.nn-game-view[data-orientation=landscape] .nn-table-center small { display: none; }.nn-game-view[data-orientation=landscape] .nn-selection { max-width: 250px; }
.nn-game-view .nn-heading>span,.nn-game-view .nn-heading strong,.nn-game-view .nn-rules>summary { color: #efdfb3; }
.nn-game-view[data-orientation=landscape] .nn-multi-table.nn-seats-4 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(0,1fr)); gap: 2px 12px; }
.nn-game-view[data-orientation=landscape] .nn-seats-4 .nn-multi-seat { position: static; transform: none; max-width: 100%; align-self: center; justify-self: center; }
.nn-game-view[data-orientation=landscape] .nn-seats-4 [data-nn-position="0"] { grid-column: 2; grid-row: 2; }
.nn-game-view[data-orientation=landscape] .nn-seats-4 [data-nn-position="1"] { grid-column: 2; grid-row: 1; }
.nn-game-view[data-orientation=landscape] .nn-seats-4 [data-nn-position="2"] { grid-column: 1; grid-row: 1; }
.nn-game-view[data-orientation=landscape] .nn-seats-4 [data-nn-position="3"] { grid-column: 1; grid-row: 2; }
.nn-game-view[data-orientation=landscape] .nn-seats-4 .nn-multi-seat .nn-card { width: var(--nn-row-w); height: var(--nn-row-h); }
#points-page .nn-game-view[data-orientation=landscape] .nn-seats-4 .nn-select-card { width: var(--nn-row-w); }
.nn-game-view[data-orientation=landscape] .nn-seats-4 .nn-hand { padding-top: 2px; margin: 4px 0; }
.nn-game-view[data-orientation=landscape] .nn-seats-4 .nn-select-card[aria-pressed=true] { transform: translateY(-3px); outline-width: 2px; }
.nn-game-view[data-orientation=landscape] .nn-seats-2 [data-nn-position="0"] { left: 72%; top: 50%; bottom: auto; transform: translate(-50%,-50%); }
.nn-game-view[data-orientation=landscape] .nn-seats-2 [data-nn-position="2"] { left: 28%; top: 50%; transform: translate(-50%,-50%); }
#points-page .nn-game-view .nn-mode-bar button { padding: 5px 8px; }
#points-page .nn-game-view>.game-section-heading button { padding: 7px 9px; }
#points-page .nn-game-view .nn-heading button { padding: 5px 8px; }
#points-page .nn-game-view .nn-controls button { padding: 7px 12px; }
/* Cards arrive face down; no rank is rendered until the deal completes. */
.nn-deal-slot { display: inline-flex; width: inherit; height: inherit; flex: none; }
.nn-deal-slot:not(.nn-deal-landed) { visibility: hidden; }
.nn-deal-arriving { animation: nn-card-arrive .14s ease-out both; }
@keyframes nn-card-arrive { from { opacity: 0; transform: translate(16px,-18px) rotate(-9deg) scale(.8); } to { opacity: 1; transform: translate(0,0) rotate(0) scale(1); } }
.nn-game-view [data-dealing=true] .nn-select-card { pointer-events: none; }
.nn-game-view .nn-card { container-type: inline-size; }
#points-page .nn-game-view .nn-card .nn-card-corner { font-size: clamp(12px,29cqw,24px); font-weight: 800; line-height: 1; left: 3px; top: 3px; }
#points-page .nn-game-view .nn-card .nn-card-corner small { font-size: clamp(9px,19cqw,14px); }
#points-page .nn-game-view .nn-card>b { font-size: clamp(18px,55cqw,40px); font-weight: 800; line-height: 1; margin-top: 8px; }
@container (max-width: 35px) {
 #points-page .nn-game-view .nn-card .nn-card-corner { left: 50%; top: 50%; transform: translate(-50%,-50%); text-align: center; font-size: 16px; }
 #points-page .nn-game-view .nn-card .nn-card-corner small { font-size: 9px; }
 #points-page .nn-game-view .nn-card>b,#points-page .nn-game-view .nn-card .nn-card-bottom { display: none; }
}
@media(prefers-reduced-motion:reduce) { .nn-deal-arriving { animation: none; } }
/* Three compact orientation controls fit beside the exit on a narrow phone. */
@media(max-width:500px) {
 #mahjong-section.mj-game-view>.game-section-heading h2,
 #niuniu-section.nn-game-view>.game-section-heading h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
 #mahjong-section.mj-game-view>.game-section-heading,
 #niuniu-section.nn-game-view>.game-section-heading { justify-content: space-between; flex-wrap: nowrap; }
}
/* Landscape four-player Niuniu: each seat occupies a corner of the felt. */
.nn-game-view[data-orientation=landscape] .nn-multi-table.nn-seats-4 { padding: 6px 12px; gap: 6px 24px; }
.nn-game-view[data-orientation=landscape] .nn-seats-4::before { content: '牛'; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); color: #d8c486; opacity: .18; font: 700 44px/1 STKaiti,KaiTi,serif; pointer-events: none; }
.nn-game-view[data-orientation=landscape] .nn-seats-4 .nn-multi-seat { padding: 3px 8px; border: 1px solid #d1d6a629; border-radius: 10px; background: #0a37272b; max-width: 100%; min-height: 0; }
.nn-game-view[data-orientation=landscape] .nn-seats-4 [data-nn-position="0"] { align-self: end; justify-self: end; border-color: #e8cc7988; }
.nn-game-view[data-orientation=landscape] .nn-seats-4 [data-nn-position="1"] { align-self: start; justify-self: end; }
.nn-game-view[data-orientation=landscape] .nn-seats-4 [data-nn-position="2"] { align-self: start; justify-self: start; }
.nn-game-view[data-orientation=landscape] .nn-seats-4 [data-nn-position="3"] { align-self: end; justify-self: start; }
.nn-game-view[data-orientation=landscape] .nn-seats-4 .nn-multi-seat { padding-top: 2px; padding-bottom: 2px; }
.nn-game-view[data-orientation=landscape] .nn-seats-4 .nn-multi-seat>strong { line-height: 1.2; }
.nn-game-view[data-orientation=landscape] .nn-seats-4 .nn-hand { padding-top: 0; margin: 2px 0; }
.nn-game-view[data-orientation=landscape] .nn-seats-4 .nn-hand-label { line-height: 1.1; margin-top: 2px; }
.farm-pet-svg .pet-eyes { transform-origin: 46px 44px; }
.pet-kind-dog .pet-tail { animation-duration: .8s; }
.pet-kind-cat .pet-tail { animation-duration: 2.2s; }
.pet-kind-panda .pet-body-bob { animation-duration: 3.6s; }
/* Keep the local player's hand at the bottom center in landscape. */
.nn-game-view[data-orientation=landscape] .nn-seats-4 [data-nn-position="0"] { grid-column: 1 / -1; grid-row: 2; justify-self: center; align-self: end; }
.nn-game-view[data-orientation=landscape] .nn-seats-2 [data-nn-position="0"] { top: auto; bottom: 6px; left: 50%; transform: translateX(-50%); }
.nn-game-view[data-orientation=landscape] .nn-seats-2 [data-nn-position="2"] { top: 6px; left: 50%; transform: translateX(-50%); }
.nn-game-view[data-orientation=landscape] .nn-seats-2 .nn-multi-seat .nn-card { width: var(--nn-row-w); height: var(--nn-row-h); }
#points-page .nn-game-view[data-orientation=landscape] .nn-seats-2 .nn-select-card { width: var(--nn-row-w); }
.nn-game-view[data-orientation=landscape] .nn-seats-2 .nn-hand { padding-top: 0; margin: 3px 0; }
.nn-game-view[data-orientation=landscape] .nn-seats-2 .nn-multi-seat>strong,.nn-game-view[data-orientation=landscape] .nn-seats-2 .nn-hand-label { line-height: 1.2; }
.nn-game-view[data-orientation=landscape] .nn-player { left: 50%; }
.nn-covered-card { position: relative; display: inline-flex; }
.nn-rub-badge { position: absolute; left: 50%; bottom: 3px; transform: translateX(-50%); padding: 1px 4px; border-radius: 5px; background: #f6d44e; color: #000; font-size: 9px; white-space: nowrap; }
.nn-squeeze-dialog { width: min(360px,calc(100vw - 24px)); max-height: calc(100dvh - 20px); padding: 20px; background: #f8f4e4; color: #2e4136; text-align: center; overflow: auto; }
.nn-squeeze-dialog::backdrop { background: #06241dcc; }
.nn-squeeze-close { position: absolute; top: 8px; right: 10px; width: 32px; height: 32px; font-size: 26px; color: #2e4136; }
.nn-squeeze-dialog h3 { margin: 5px 0 10px; }
.nn-rub-instruction { margin: 8px 0 14px; font-size: 13px; }
.nn-rub-card { position: relative; width: min(160px,32dvh); aspect-ratio: 5 / 7; margin: auto; border-radius: 12px; overflow: hidden; box-shadow: 0 6px 18px #153d3440; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.nn-rub-card:active { cursor: grabbing; }
.nn-rub-face,.nn-rub-cover { position: absolute; inset: 0; }
.nn-rub-face { clip-path: inset(100% 0 0 0); }
.nn-rub-cover { box-shadow: 0 5px 8px #0005; will-change: transform; }
.nn-rub-card .nn-card { width: 100%; height: 100%; border-radius: 12px; }
.nn-rub-card .nn-card>b { font-size: 56px; font-weight: 800; }
.nn-rub-card .nn-card-corner { font-size: 28px; left: 10px; top: 10px; }
.nn-rub-card .nn-card-corner small { font-size: 21px; }
.nn-rub-card .nn-card-bottom { display: block; font-size: 22px; right: 10px; bottom: 10px; }
.nn-rub-progress { font-size: 12px; color: #65705e; margin: 10px 0; }
.nn-rub-open { padding: 10px 20px; font-size: 12px; }
@media(max-height:450px) { .nn-squeeze-dialog { padding: 10px 20px; }.nn-squeeze-dialog h3 { margin: 0; font-size: 16px; }.nn-rub-instruction { margin: 6px 0; }.nn-rub-card { width: min(130px,29dvh); }.nn-rub-card .nn-card>b { font-size: 35px; }.nn-rub-card .nn-card-corner { font-size: 18px; top: 5px; left: 5px; }.nn-rub-card .nn-card-corner small { font-size: 12px; }.nn-rub-card .nn-card-bottom { font-size: 15px; right: 5px; bottom: 5px; }.nn-rub-progress { margin: 5px 0; } }
/* A bounded settlement screen: four hands left, compact ledger right, actions below. */
.mj-table-mode[data-orientation=landscape] .mj-room[data-phase=finished] { grid-template-columns: minmax(0,1fr) minmax(220px,30%); grid-template-rows: auto minmax(0,1fr) auto auto; gap: 6px 10px; }
.mj-table-mode[data-orientation=landscape] .mj-room[data-phase=finished] .mj-table-revealed { grid-column: 1; grid-row: 2; height: 100%; min-height: 0; margin: 0; padding: 0; grid-template-rows: 20px repeat(2,minmax(0,1fr)); overflow: hidden; }
.mj-table-mode[data-orientation=landscape] .mj-room[data-phase=finished] .mj-result { grid-column: 2; grid-row: 2; min-height: 0; max-height: none; height: 100%; margin: 0; padding: 10px; overflow: auto; overscroll-behavior: contain; border: 1px solid #e6cf82; background: #fff5d3; border-radius: 12px; scrollbar-width: thin; }
.mj-table-mode[data-orientation=landscape] .mj-room[data-phase=finished] .mj-table-controls { grid-column: 1 / -1; grid-row: 3; border: 0; margin: 0; padding: 2px; }
.mj-table-mode[data-orientation=landscape] .mj-room[data-phase=finished] .mj-status { grid-column: 1; grid-row: 4; min-height: 0; }
.mj-table-mode[data-orientation=landscape] .mj-room[data-phase=finished] .mj-table-info { grid-column: 2; grid-row: 4; }
.mj-table-mode[data-orientation=landscape] .mj-room[data-phase=finished] .mj-revealed-seat { padding: 6px 8px; border-radius: 10px; overflow: auto; }
.mj-table-mode[data-orientation=landscape] .mj-room[data-phase=finished] .mj-revealed-heading { display: flex; flex-wrap: wrap; gap: 2px 6px; margin-bottom: 5px; align-items: baseline; }
.mj-table-mode[data-orientation=landscape] .mj-room[data-phase=finished] .mj-reveal-title { font-size: 12px; line-height: 18px; margin: 0; }
.mj-table-mode .mj-result h3 { font-size: 15px; line-height: 1.35; margin: 0 0 4px; overflow-wrap: anywhere; }
.mj-table-mode .mj-result>p { font-size: 11px; line-height: 1.5; margin: 0 0 7px; }
.mj-table-mode .mj-result .mj-bonus { gap: 4px; padding: 7px; margin: 7px 0; border-radius: 8px; background: #eadaaa66; font-size: 11px; }
.mj-table-mode .mj-result .mj-bonus>span:first-child { flex-basis: 100%; font-weight: 600; }
.mj-table-mode .mj-result .mj-bonus .mj-tile { width: 23px; height: 32px; padding: 1px; border-bottom-width: 2px; }
.mj-table-mode .mj-result .mj-bonus>span:last-child { flex-basis: 100%; }
.mj-score-list { margin: 8px 0; border-top: 1px solid #d9c892; }
.mj-score-item { padding: 5px 0; border-bottom: 1px solid #d9c892; }
.mj-table-mode .mj-result .mj-score-item .points-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0; font-size: 11px; }
.mj-score-item .points-row>span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mj-score-item .points-row>strong { flex: none; font-size: 12px; }
.mj-table-mode .mj-result .mj-score-breakdown { margin: 1px 0 0; font-size: 9px; color: #756532; }
.mj-table-mode .mj-result details { margin: 7px 0; font-size: 11px; }
.mj-table-mode .mj-result .mj-settled-note { margin: 8px 0 0; font-size: 10px; }
.mj-table-mode[data-orientation=landscape] .mj-result .mj-bonus>span:last-child { flex-basis: auto; font-size: 10px; }
.mj-table-mode[data-orientation=landscape] .mj-result .mj-score-item { padding: 3px 0; }
.mj-table-mode[data-orientation=landscape] .mj-result .mj-score-list { margin: 5px 0; }

/* Traditional faces and a curved paper fold belong only to the squeeze dialog. */
.nn-rub-card .nn-pip-face { display:block;width:100%;height:100%;font-family:Georgia,'Times New Roman',serif; }
.nn-rub-cover { transform:none;box-shadow:none;will-change:clip-path; }
.nn-rub-curl { position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;filter:drop-shadow(0 3px 3px #30281770); }
.nn-rub-card[data-edge=top] .nn-rub-curl { transform:rotate(180deg); }
.nn-rub-card[data-edge=left] .nn-rub-curl { transform:matrix(0,1,-1,0,0,0);width:140%;height:71.4286%;left:-20%;top:14.2857%; }
.nn-rub-card[data-edge=right] .nn-rub-curl { transform:matrix(0,-1,1,0,0,0);width:140%;height:71.4286%;left:-20%;top:14.2857%; }

/* Soft volume and small, staggered movements for the farm companions. */
.pet-ear { transform-box:fill-box;transform-origin:center bottom;animation:farm-ear-twitch 6.7s ease-in-out infinite; }
.pet-ear:nth-child(2) { animation-delay:-2.8s; }
.pet-ground-shadow { transform-origin:72px 102px;animation:farm-shadow-breathe 2.6s ease-in-out infinite; }
.walker-1 .pet-head,.walker-3 .pet-head { animation-delay:-1.3s; }
.walker-2 .pet-eyes,.walker-4 .pet-eyes { animation-delay:-2.1s; }
@keyframes farm-ear-twitch { 0%,72%,84%,100% { transform:rotate(0); } 76% { transform:rotate(-9deg); } 80% { transform:rotate(6deg); } }
@keyframes farm-shadow-breathe { 0%,100% { transform:scaleX(1);opacity:1; } 50% { transform:scaleX(.92);opacity:.8; } }

/* Keep the squeeze surface aligned with the table, including manual landscape. */
.nn-squeeze-dialog[data-layout=landscape] {
 width:min(640px,calc(var(--rub-view-width) - 24px));max-width:none;
 max-height:calc(var(--rub-view-height) - 24px);padding:22px 28px;
 grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto auto auto auto;
 align-items:center;column-gap:24px;row-gap:10px;
}
.nn-squeeze-dialog[data-layout=landscape][open] { display:grid; }
.nn-squeeze-dialog[data-layout=landscape] .nn-rub-card {
 grid-column:1;grid-row:1 / 5;width:min(186px,calc((var(--rub-view-height) - 76px) / 1.4));
}
.nn-squeeze-dialog[data-layout=landscape] h3 { grid-column:2;grid-row:1;margin:0;align-self:end; }
.nn-squeeze-dialog[data-layout=landscape] .nn-rub-instruction { grid-column:2;grid-row:2;margin:0;line-height:1.6; }
.nn-squeeze-dialog[data-layout=landscape] .nn-rub-progress { grid-column:2;grid-row:3;margin:0; }
.nn-squeeze-dialog[data-layout=landscape] .nn-rub-open { grid-column:2;grid-row:4;align-self:start;justify-self:center; }
.nn-squeeze-dialog[data-rotated=true] { position:fixed;inset:auto;left:50%;top:50%;margin:0;transform:translate(-50%,-50%) rotate(90deg); }

/* Readiness stays above the card backs, clear of their raised lower shadow. */
.nn-game-view[data-orientation=landscape] .nn-multi-game[data-phase=waiting] .nn-multi-seat { display:flex;flex-direction:column;align-items:center; }
.nn-game-view[data-orientation=landscape] .nn-multi-game[data-phase=waiting] .nn-multi-seat>strong { order:0;max-width:100%; }
.nn-game-view[data-orientation=landscape] .nn-multi-game[data-phase=waiting] .nn-hand-label { order:1;margin:3px 0 5px;line-height:14px;font-size:10px;color:#ffeb9e; }
.nn-game-view[data-orientation=landscape] .nn-multi-game[data-phase=waiting] .nn-hand { order:2;margin:0 0 5px;padding:0; }
@media (max-height:350px), (orientation:portrait) and (max-width:350px) {
 .nn-game-view[data-orientation=landscape] .nn-multi-game[data-phase=waiting] .nn-hand-label { margin:1px 0;line-height:12px; }
 .nn-game-view[data-orientation=landscape] .nn-multi-game[data-phase=waiting] .nn-hand { margin:0 0 2px; }
 .nn-game-view[data-orientation=landscape] .nn-multi-game[data-phase=waiting] .nn-card { width:12px;height:16px;border-width:1px;border-radius:3px;box-shadow:0 2px 0 #c0baa0; }
 #points-page .nn-game-view[data-orientation=landscape] .nn-multi-game[data-phase=waiting] .nn-select-card { width:12px; }
 .nn-game-view[data-orientation=landscape] .nn-multi-game[data-phase=waiting] .nn-card-back>span { font-size:10px; }
}

/* Turn by shifting head, torso and tail through a front-facing pose, never flattening the SVG. */
.farm-walker .pet-facing-head { animation: farm-turn-head var(--farm-walk-duration) ease-in-out var(--farm-walk-delay) infinite;transform-origin:46px 70px; }
.farm-walker .pet-torso { animation: farm-turn-body var(--farm-walk-duration) ease-in-out var(--farm-walk-delay) infinite; }
.farm-walker .pet-tail-position { animation: farm-turn-tail var(--farm-walk-duration) ease-in-out var(--farm-walk-delay) infinite; }
@keyframes farm-turn-head {
 0%,23%,52%,73%,100% { transform:translate(40px,0) rotate(3deg); }
 25%,50%,75%,98.5% { transform:translate(20px,-2px) rotate(0); }
 27%,48%,77%,97% { transform:translate(0,0) rotate(-3deg); }
}
@keyframes farm-turn-body {
 0%,23%,52%,73%,100% { transform:translateX(-20px); }
 27%,48%,77%,97% { transform:translateX(0); }
}
@keyframes farm-turn-tail {
 0%,23%,52%,73%,100% { transform:translateX(-72px) rotate(-6deg); }
 27%,48%,77%,97% { transform:translateX(0) rotate(0); }
}

/* Four-seat landscape table: opposite above, neighbours beside, self below. */
.nn-game-view[data-orientation=landscape] .nn-multi-table.nn-seats-4 {
 display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr);
 grid-template-rows:repeat(2,minmax(0,1fr));gap:6px 12px;padding:6px 12px;
}
.nn-game-view[data-orientation=landscape] .nn-seats-4 [data-nn-position="0"] { grid-column:2;grid-row:2;justify-self:center;align-self:end; }
.nn-game-view[data-orientation=landscape] .nn-seats-4 [data-nn-position="1"] { grid-column:3;grid-row:1 / 3;justify-self:end;align-self:center; }
.nn-game-view[data-orientation=landscape] .nn-seats-4 [data-nn-position="2"] { grid-column:2;grid-row:1;justify-self:center;align-self:start; }
.nn-game-view[data-orientation=landscape] .nn-seats-4 [data-nn-position="3"] { grid-column:1;grid-row:1 / 3;justify-self:start;align-self:center; }

#points-page .farm-walker { pointer-events:auto;background:none;border:0;padding:0;cursor:pointer;min-width:0;touch-action:manipulation; }
.farm-walker:focus-visible { outline:2px solid #f7cf45;outline-offset:3px; }
.farm-walker:hover,.farm-walker:focus-visible { animation-play-state:paused; }
.farm-pet-name { display:block;width:max-content;max-width:100%;margin:0 auto;padding:2px 6px;border-radius:10px;background:#fff9dfed;color:#35513b;font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.farm-pet-hello { background:transparent;border:0;cursor:pointer; }
.farm-pet-description>button { margin-top:8px;padding:6px 12px;font-size:12px; }
.farm-pet-dialog { width:min(360px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:24px;background:#fffbed;color:#35513b;border:0;border-radius:20px;text-align:center; }
.farm-pet-dialog::backdrop { background:#143d2c99; }
.farm-pet-dialog>.farm-pet-svg { width:160px;height:128px;margin:auto; }
.farm-pet-dialog-close { position:absolute;right:10px;top:8px;font-size:26px;padding:4px 10px; }
.farm-pet-greeting { background:#eaf0d8;border-radius:14px;padding:14px;line-height:1.8;font-size:14px; }
.farm-pet-name-form { display:grid;gap:12px;text-align:left; }
.farm-pet-name-form input { display:block;width:100%;margin-top:8px;padding:10px;border:1px solid #ced9b7;border-radius:8px;font-size:16px; }
.farm-pet-name-form small { color:#74816b; }
.nn-rules-heading { position:sticky;top:-20px;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:-20px -20px 12px;padding:12px 20px;background:#fffdf2;border-bottom:1px solid #dedac7; }
.nn-rules-heading strong { color:#334a38; }
.nn-rules-heading [data-nn-rules-close] { flex:none;padding:8px 14px;background:#f6d44e;color:#000;font-size:13px; }

/* Put reveal status above the cards so raised card shadows cannot cover the text. */
.nn-game-view .nn-dealer { display:flex;flex-direction:column;align-items:center; }
.nn-game-view .nn-dealer .nn-seat-label { order:0; }
.nn-game-view .nn-dealer .nn-hand-label { order:1;margin:0 0 6px;line-height:14px; }
.nn-game-view .nn-dealer .nn-hand { order:2;margin-top:0; }
.nn-game-view .nn-multi-game[data-phase=playing] .nn-multi-seat { display:flex;flex-direction:column;align-items:center; }
.nn-game-view .nn-multi-game[data-phase=playing] .nn-multi-seat>strong { order:0;max-width:100%; }
.nn-game-view .nn-multi-game[data-phase=playing] .nn-hand-label { order:1;margin:3px 0 6px;line-height:13px; }
.nn-game-view .nn-multi-game[data-phase=playing] .nn-hand { order:2;margin-top:0; }
.farm-pet-voice-controls { display:flex;justify-content:center;gap:12px;margin:12px 0 6px; }
.farm-pet-voice-controls button { padding:9px 16px;font-size:13px; }
.farm-pet-voice-status { min-height:18px;font-size:12px;color:#71815e;margin:4px 0 12px; }
.nn-card.nn-card-back { border:0;background:#f9f3df;overflow:hidden; }
.nn-card-back .nn-back-art { display:block;width:100%;height:100%;flex:none; }
.mj-info-heading { position:sticky;top:-20px;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:-20px -20px 12px;padding:12px 20px;background:#fffdf2;border-bottom:1px solid #dedac7;color:#334b37; }
.mj-info-heading [data-mj-info-close] { flex:none;padding:8px 14px;background:#f6d44e;color:#000;font-size:13px; }

/* Reserve a compact nameplate above the opposite player's discard area. */
.mj-table-mode .mj-table-scene .mj-table-seat-2 {
 display:grid;grid-template-columns:36px minmax(0,1fr);grid-template-rows:auto auto auto;
 align-items:center;column-gap:7px;row-gap:1px;width:174px !important;height:64px;
 padding:4px 7px;box-sizing:border-box;
}
.mj-table-mode .mj-table-seat-2 .mj-player-avatar { grid-column:1;grid-row:1 / 4;width:32px;height:32px;font-size:14px; }
.mj-table-mode .mj-table-seat-2>strong { grid-column:2;grid-row:1;margin:0;line-height:15px; }
.mj-table-mode .mj-table-seat-2>small { grid-column:2;grid-row:2;margin:0;line-height:12px; }
.mj-table-mode .mj-table-seat-2 .mj-concealed,.mj-table-mode .mj-table-seat-2 .mj-ready-state { grid-column:2;grid-row:3;margin:0;justify-content:center; }
.mj-table-mode[data-orientation=portrait] .mj-river-2 { top:126px;max-height:58px; }
.mj-table-mode[data-orientation=landscape] .mj-river-2 { top:76px;max-height:46px; }
.mj-deal-back { display:block;width:var(--mj-hand-width,34px);height:var(--mj-hand-height,48px);border:2px solid #ede6c7;border-bottom:5px solid #d2caa9;border-radius:5px;background:linear-gradient(135deg,#4d9679,#24624c);box-shadow:0 2px 4px #092d2b66;visibility:hidden; }
.mj-deal-back.mj-dealt { visibility:visible; }
.mj-deal-back.mj-deal-new { animation:mj-deal-arrive .08s ease-out; }
.mj-room[data-opening=shuffle] .mj-hand button,.mj-room[data-opening=dice] .mj-hand button,.mj-room[data-opening=deal] .mj-hand button { pointer-events:none; }
.mj-shuffle-pile { display:grid;grid-template-columns:repeat(4,10px);gap:3px; }
.mj-shuffle-pile i { width:10px;height:16px;background:#f0e8cb;border:2px solid #79a18a;border-radius:2px;animation:mj-shuffle-wiggle .4s ease-in-out infinite alternate; }
.mj-shuffle-pile i:nth-child(2n) { animation-delay:-.2s; }
@keyframes mj-shuffle-wiggle { from { transform:translate(-3px,2px) rotate(-16deg); } to { transform:translate(3px,-2px) rotate(16deg); } }
@keyframes mj-deal-arrive { from { opacity:.2;transform:translateY(-15px); } to { opacity:1;transform:translateY(0); } }
@media(prefers-reduced-motion:reduce) { .mj-shuffle-pile i,.mj-deal-back.mj-dealt { animation:none; } }

/* The visible rules label is the entire hit target; the blank footer is not clickable. */
.nn-game-view .nn-rules>summary { width:max-content;max-width:100%;margin-left:auto;touch-action:manipulation; }

/* Solo replay controls share one baseline and one control height. */
.nn-game-view .nn-game .nn-controls:has(#nn-base) { align-items:center;flex-wrap:nowrap;gap:12px; }
.nn-game-view .nn-game .nn-controls label:has(#nn-base) { flex-direction:row;align-items:center;gap:8px;white-space:nowrap; }
.nn-game-view #nn-base { height:36px;min-width:96px;box-sizing:border-box;margin:0;padding:0 10px;line-height:normal; }
#points-page .nn-game-view .nn-game [data-nn=deal] { height:36px;min-height:36px;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;padding:0 16px;line-height:1;white-space:nowrap; }

/* Points red packet game */
.rp-game{max-width:1000px;margin:auto}.rp-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:28px;border-radius:22px;background:linear-gradient(125deg,#9f2029,#df4948);color:#fff4dc}.rp-hero h2{font-size:32px;margin:8px 0}.rp-hero p{margin:8px 0 20px}.rp-hero small{font-size:14px}.rp-hero b{font-size:23px;margin-left:8px}.rp-game .primary,.rp-dialog .primary{background:#ffd45c!important;color:#302213!important;border:0;border-radius:12px;padding:11px 16px;font-weight:700;cursor:pointer}.rp-rules{padding:16px 4px;font-size:14px;line-height:1.8}.rp-rules summary{cursor:pointer;width:max-content}.rp-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.rp-tabs button{padding:10px 14px;border:1px solid #eadbd6;border-radius:20px;background:#fff;color:#5c3f39}.rp-tabs button[aria-pressed=true]{background:#a52632;color:white;border-color:#a52632}.rp-tabs button:last-child{margin-left:auto}.rp-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.rp-packet{padding:20px;background:#fff8ef;border:1px solid #f2d7bb;border-radius:18px;min-width:0}.rp-packet-top,.rp-packet-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px}.rp-packet-top span{overflow-wrap:anywhere}.rp-packet small{font-size:12px}.rp-packet h3{margin:18px 0 10px;overflow-wrap:anywhere}.rp-total{font-size:30px;color:#ae2730}.rp-packet p{font-size:13px;line-height:1.7;color:#75544a}.rp-packet-bottom{border-top:1px solid #eddccc;padding-top:14px;font-size:12px}.rp-empty{text-align:center;grid-column:1/-1;padding:45px 12px;background:#fff9f1;border-radius:18px}.rp-dialog{width:min(480px,calc(100vw - 28px));max-width:calc(100vw - 28px);max-height:85dvh;box-sizing:border-box;border:0;border-radius:20px;padding:20px;color:#3e2924;overflow:auto}.rp-dialog::backdrop{background:#24100ea8}.rp-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:-20px;background:white;padding:10px 0;z-index:1}.rp-form{display:grid;gap:15px}.rp-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.rp-form label{display:grid;gap:7px;font-size:14px;min-width:0}.rp-form input,.rp-form select{width:100%;min-width:0;box-sizing:border-box;margin:0;padding:11px;border:1px solid #decfc5;border-radius:10px;background:white;font-size:16px}.rp-form p,.rp-dialog p{line-height:1.65;font-size:14px}.rp-terms{background:#fff0d4;padding:12px;border-radius:10px}.rp-detail-hero{text-align:center;padding:20px 0}.rp-detail-hero>span{font-size:55px}.rp-detail-hero h2{overflow-wrap:anywhere}.rp-detail-hero>strong{font-size:32px;color:#ab2531}.rp-detail-hero small{font-size:14px}.rp-grab{display:block;width:100%;margin-top:12px}.rp-claim{display:flex;justify-content:space-between;gap:12px;padding:13px 0;border-bottom:1px solid #eee}.rp-claim>div{min-width:0;overflow-wrap:anywhere}.rp-claim>div:last-child{text-align:right;flex-shrink:0}.rp-claim small{display:block;color:#836b62;font-size:11px;margin-top:5px}.rp-result{text-align:center;padding:15px;background:#ecf8ed;border-radius:12px}.rp-hit{background:#ffebdf}.rp-result h3{margin:0}.rp-dialog [role=status],.rp-game [data-rp-error]{color:#a72630}.rp-dialog button:disabled{opacity:.55;cursor:wait}@media(max-width:600px){.rp-list{grid-template-columns:1fr}.rp-hero{padding:20px;gap:10px}.rp-hero h2{font-size:27px}.rp-hero p{font-size:13px}.rp-hero>button{flex-shrink:0}.rp-packet{padding:17px}.rp-tabs{gap:5px}.rp-tabs button{padding:9px 11px}}
.rp-room-bar{display:flex;align-items:center;justify-content:space-between;gap:14px;background:#fff9f0;border:1px solid #efdfcb;border-radius:16px;padding:16px;margin-top:16px}.rp-room-bar h3{margin:0 0 8px;overflow-wrap:anywhere}.rp-room-bar p{font-size:13px;line-height:1.6;margin:5px 0;overflow-wrap:anywhere}.rp-room-actions{display:flex;flex-wrap:wrap;gap:8px;flex-shrink:0}.rp-room-list{display:grid;gap:12px;margin-top:18px}.rp-room-list>button{display:grid;gap:8px;text-align:left;padding:18px;background:#fff6e8;border:1px solid #edd6b5;border-radius:14px;color:#4a2c25;overflow-wrap:anywhere}.rp-room-list span{font-size:13px}.rp-room-list small{font-size:12px;color:#805342}@media(max-width:600px){.rp-room-bar{align-items:stretch;flex-direction:column}.rp-room-actions button{flex:1}}
.rp-game .rp-hero{height:auto;min-height:190px;position:relative;overflow:hidden}.rp-hero>div{min-width:0}.rp-packet-top>small{flex-shrink:0}.rp-game{padding-bottom:20px}
/* Group chat with inline red envelopes. */
.rp-timeline{height:clamp(280px,52dvh,620px);overflow:auto;overscroll-behavior:contain;background:#f5f2ec;border:1px solid #ebe1d5;border-radius:16px 16px 0 0;padding:20px;display:flex;flex-direction:column;gap:20px;scrollbar-width:thin}.rp-chat-message{display:flex;flex-direction:column;align-items:flex-start;max-width:85%;flex-shrink:0}.rp-chat-author{display:block;font-size:13px;color:#655347;margin-bottom:6px;overflow-wrap:anywhere}.rp-chat-author small{font-size:10px;color:#877c70;margin-left:6px}.rp-chat-message>p{white-space:pre-wrap;overflow-wrap:anywhere;background:white;border-radius:2px 14px 14px;padding:12px 15px;margin:0;font-size:14px;line-height:1.6}.rp-self{align-self:flex-end;align-items:flex-end}.rp-self>p{background:#fff0b5;border-radius:14px 2px 14px}.rp-envelope{display:grid;grid-template-columns:42px minmax(0,1fr);gap:8px;text-align:left;background:linear-gradient(130deg,#bd3035,#df5444);color:#fff3d5;border:1px solid #bf3434;border-radius:14px;padding:18px 15px 0;max-width:340px;width:100%;box-shadow:0 4px 10px #842a1912}.rp-envelope-icon{font-size:34px}.rp-envelope strong,.rp-envelope b,.rp-envelope small{display:block;margin-bottom:8px;overflow-wrap:anywhere}.rp-envelope strong{font-size:17px}.rp-envelope b{font-size:14px}.rp-envelope small{font-size:11px;line-height:1.6}.rp-envelope em{grid-column:1/-1;font-size:11px;font-style:normal;border-top:1px solid #ffffff40;padding:10px 0}.rp-envelope-done{background:#bb7865;border-color:#b78270}.rp-chat-notice{font-size:12px;line-height:1.6;color:#856b50;text-align:center;overflow-wrap:anywhere;flex-shrink:0}.rp-chat-notice button{color:#9c2730;text-decoration:underline;padding:4px}.rp-chat-welcome{text-align:center;color:#95806d;font-size:14px;margin:auto}.rp-chat-compose{display:flex;align-items:flex-end;gap:8px;padding:12px;background:#fffaf3;border:1px solid #ebe1d5;border-top:0;border-radius:0 0 16px 16px}.rp-chat-compose textarea{flex:1;min-width:0;resize:vertical;max-height:100px;min-height:44px;border:1px solid #e2d5c7;border-radius:12px;padding:11px;font-size:16px;background:white}.rp-chat-compose button{flex-shrink:0;min-height:44px}.rp-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.rp-join-form{display:flex;gap:8px;align-items:flex-end;margin-bottom:12px}.rp-join-form label{display:grid;gap:8px;flex:1;min-width:0;font-size:13px}.rp-join-form input{width:100%;padding:12px 10px;box-sizing:border-box;border:1px solid #ddcdbb;border-radius:10px;font-size:16px;min-width:0}.rp-join-form button{flex-shrink:0}.rp-older{display:block;margin:10px auto;color:#92623f;padding:10px;font-size:13px}.rp-sound{display:block;margin:10px 0 0 auto;font-size:12px;color:#82634c;padding:8px}.rp-opening .rp-detail-hero>span{display:inline-block;animation:rp-open-shake .18s ease-in-out infinite alternate}.rp-result{animation:rp-reveal .35s ease-out}.rp-room-actions{max-width:360px}.rp-tabs{align-items:center}.rp-tabs button:last-child{margin-left:0}@keyframes rp-open-shake{from{transform:rotate(-8deg) scale(1)}to{transform:rotate(8deg) scale(1.13)}}@keyframes rp-reveal{from{opacity:0;transform:translateY(10px) scale(.96)}to{opacity:1;transform:none}}@media(max-width:600px){.rp-timeline{padding:14px 10px;height:52dvh;min-height:280px}.rp-chat-message{max-width:94%}.rp-chat-compose{padding:8px;gap:5px}.rp-game .rp-chat-compose button{padding:10px}.rp-chat-author small{display:block;margin:3px 0 0}.rp-room-actions{max-width:none}.rp-tabs button{font-size:12px;padding:9px}.rp-envelope{grid-template-columns:30px minmax(0,1fr);padding:14px 12px 0}.rp-envelope-icon{font-size:28px}}@media(prefers-reduced-motion:reduce){.rp-opening .rp-detail-hero>span,.rp-result{animation:none}}
.rp-game.rp-in-group .rp-hero{min-height:0;padding:16px 20px}.rp-in-group .rp-hero>div>span,.rp-in-group .rp-hero p{display:none}.rp-in-group .rp-hero h2{font-size:23px;margin:0 0 8px}.rp-in-group .rp-hero b{font-size:20px}.rp-in-group .rp-room-bar{margin-top:12px}.rp-room-actions .primary{font-size:12px;padding:10px;white-space:nowrap}.rp-room-bar{align-items:flex-start}.rp-room-bar>div:first-child{min-width:0}.rp-chat-compose .primary{color:#241d12!important}
/* Standalone group chat page; the message area is the only scrolling column. */
body.rp-chat-open{overflow:hidden;overscroll-behavior:none}.rp-inner-head,.rp-inner-balance,.rp-panel-heading{display:none}.rp-game.rp-inner-page{position:fixed;inset:var(--rp-vtop,0px) 0 auto;z-index:40;width:100%;max-width:none;height:var(--rp-vheight,100dvh);margin:0;padding:env(safe-area-inset-top,0px) max(16px,env(safe-area-inset-right,0px)) env(safe-area-inset-bottom,0px) max(16px,env(safe-area-inset-left,0px));background:#f6f2ec;display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box}.rp-inner-page>.rp-hero{display:none}.rp-inner-page .rp-inner-head{display:flex;align-items:center;gap:12px;flex-shrink:0;min-height:70px;padding:10px 0;border-bottom:1px solid #eaded0}.rp-inner-title{flex:1;min-width:0;text-align:center}.rp-inner-title h2{font-size:19px;line-height:1.3;margin:0 0 4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rp-inner-title small{font-size:12px;color:#8d7662}.rp-inner-head>button{flex-shrink:0}.rp-inner-page .rp-inner-balance{display:flex;align-items:center;gap:8px;flex-shrink:0;font-size:12px;padding:10px 4px 0;color:#715e4d}.rp-inner-balance b{font-size:15px;color:#ac3132}.rp-inner-balance>span{margin-left:auto}.rp-inner-page .rp-tabs{flex-shrink:0;margin:8px 0;gap:6px}.rp-inner-page .rp-tabs button:last-child{margin-left:auto}.rp-inner-page>[data-rp-error]{flex-shrink:0;font-size:12px;margin:0}.rp-inner-page>[data-rp-error]:not(:empty){padding:8px}.rp-inner-page .rp-older{flex-shrink:0;padding:5px;margin:0 auto 5px}.rp-inner-page>[data-rp-list]{flex:1;min-height:0;height:auto;overflow:auto;overscroll-behavior:contain;scroll-padding-bottom:10px}.rp-inner-page>.rp-list{align-content:start;padding:12px}.rp-inner-page .rp-timeline{border:none;border-radius:14px 14px 0 0;padding:18px;background:#efe9df}.rp-inner-page>.rp-chat-compose{flex-shrink:0;border-radius:0;border:0;border-top:1px solid #e5d8c7;background:#f6f2ec;padding:12px 0}.rp-inner-page>.rp-group-panel{display:none;position:absolute;z-index:3;top:calc(70px + env(safe-area-inset-top,0px));right:16px;left:16px;max-height:calc(100% - 95px - env(safe-area-inset-bottom,0px));overflow:auto;background:#fffaf3;box-shadow:0 12px 35px #49352138;border:1px solid #ecddc9;border-radius:16px;padding:16px;overscroll-behavior:contain}.rp-inner-page.rp-panel-open>.rp-group-panel{display:block}.rp-inner-page .rp-panel-heading{display:flex;justify-content:space-between;align-items:center;gap:10px}.rp-inner-page .rp-group-panel .rp-room-bar{background:none;border:0;padding:12px 0;margin:0}.rp-inner-page .rp-group-panel .rp-rules{padding-bottom:0}.rp-inner-page .rp-group-panel .rp-sound{margin-top:0}@media(min-width:900px){.rp-game.rp-inner-page{padding-left:max(32px,calc((100vw - 1000px)/2));padding-right:max(32px,calc((100vw - 1000px)/2))}.rp-inner-page>.rp-group-panel{left:auto;right:max(32px,calc((100vw - 1000px)/2));width:480px}}@media(max-width:600px){.rp-game.rp-inner-page{padding-left:max(10px,env(safe-area-inset-left,0px));padding-right:max(10px,env(safe-area-inset-right,0px))}.rp-inner-page .rp-inner-head{gap:8px;min-height:64px}.rp-inner-head .primary{font-size:12px;padding:10px}.rp-inner-title h2{font-size:17px}.rp-inner-title small{font-size:11px}.rp-inner-page .rp-timeline{padding:14px 10px}.rp-inner-page .rp-group-panel{top:calc(64px + env(safe-area-inset-top,0px));left:10px;right:10px;padding:12px}.rp-inner-page>.rp-chat-compose{padding:10px 0}.rp-inner-page .rp-tabs button{padding:8px 10px}}@media(max-height:450px){.rp-inner-page .rp-inner-head{min-height:48px;padding:5px 0}.rp-inner-title h2{font-size:15px;margin:0}.rp-inner-title small{font-size:10px}.rp-inner-page .rp-inner-balance{display:none}.rp-inner-page .rp-tabs{margin:5px 0}.rp-inner-page .rp-tabs button{padding:6px 10px}.rp-inner-page>.rp-chat-compose{padding:5px 0}.rp-inner-page>.rp-group-panel{top:50px;max-height:calc(100% - 60px)}}
/* Red and gold envelope artwork, drawn directly in CSS. */
.rp-envelope{position:relative;isolation:isolate;overflow:hidden;display:grid;grid-template-columns:minmax(0,1fr) 56px;gap:0;width:310px;max-width:100%;padding:0;border:1px solid #aa2d29;border-radius:16px;background:linear-gradient(135deg,#a91f2d 0%,#cc3437 48%,#dc5343 100%);box-shadow:0 5px 14px #8a362322;color:#fff0c4;text-align:left;transition:transform .18s,box-shadow .18s}.rp-envelope:before{content:'';position:absolute;z-index:-1;width:330px;height:175px;border:1px solid #ffd99944;border-radius:50%;top:-117px;left:-65px;background:linear-gradient(160deg,#ef715544,#8c142922);box-shadow:0 7px 0 #ffd18a08}.rp-envelope:after{content:'';position:absolute;z-index:-1;inset:7px;border:1px solid #f7c87233;border-radius:11px;pointer-events:none}.rp-envelope:hover{box-shadow:0 7px 20px #8a362333;transform:translateY(-1px)}.rp-envelope:active{transform:scale(.985)}.rp-envelope-ribbon{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:11px;letter-spacing:2px;padding:14px 17px 10px;color:#f8d09a}.rp-envelope-ribbon>small{margin:0;font-size:11px;letter-spacing:0;padding:2px 7px;border:1px solid #ffd58d66;border-radius:20px;color:#ffe4b7}.rp-envelope-copy{min-width:0;padding:4px 0 3px 17px}.rp-envelope-copy>strong{font-size:16px;font-weight:600;line-height:1.5;margin:0 0 10px;overflow-wrap:anywhere;color:#fff3d7}.rp-envelope-copy>b{font-size:29px;letter-spacing:-.6px;line-height:1.2;font-variant-numeric:tabular-nums;margin:0 0 8px;color:#ffe4a9}.rp-envelope-copy>b>small{display:inline;font-size:11px;letter-spacing:0;margin-left:5px;font-weight:400}.rp-envelope-seal{align-self:center;justify-self:center;width:43px;height:43px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:linear-gradient(145deg,#ffedb1,#efbd68);box-shadow:0 3px 8px #61191744,inset 0 0 0 3px #e1ac58,inset 0 0 0 4px #ffe0a1;border:1px solid #fbe1a4;color:#8f3b25;font-size:21px;font-weight:700;margin-right:12px}.rp-envelope-rule{grid-column:1/-1;display:flex;align-items:center;gap:7px;font-size:11px;line-height:1.6;padding:4px 17px 14px;color:#ffdfb8;overflow-wrap:anywhere}.rp-envelope-rule i{font-style:normal;font-size:11px;border:1px solid #ffd88e88;padding:1px 7px;border-radius:5px;white-space:nowrap}.rp-envelope em{display:flex;justify-content:space-between;gap:8px;grid-column:1/-1;background:#81202338;border-top:1px solid #ffd29030;padding:10px 17px;font-size:11px;color:#ffe6c3;line-height:1.5}.rp-envelope-done{background:linear-gradient(130deg,#a27769,#c0937c);border-color:#a9826d;box-shadow:0 3px 9px #60412812}.rp-envelope-done .rp-envelope-seal{background:linear-gradient(145deg,#f8dfb7,#d5b08b);color:#80583e;box-shadow:inset 0 0 0 3px #d0a37a,inset 0 0 0 4px #f0d3a8;font-size:14px}.rp-envelope-done .rp-envelope-copy>b{color:#ffedce}.rp-detail-hero{position:relative;overflow:hidden;background:radial-gradient(ellipse at top,#e8654a,#bb2933);color:#fff0ca;border-radius:15px;padding:25px 16px 22px;margin-top:10px}.rp-detail-hero:before{content:'';position:absolute;inset:7px;border:1px solid #ffd68d66;border-radius:10px;pointer-events:none}.rp-detail-hero>.rp-detail-seal{display:inline-flex;align-items:center;justify-content:center;width:58px;height:58px;border-radius:50%;font-size:32px;background:linear-gradient(145deg,#ffeab0,#eeb65e);color:#a7432e;border:4px double #af692f;box-shadow:0 4px 12px #7d192538;margin-bottom:14px}.rp-detail-hero h2{font-size:21px;margin:0 0 8px;font-weight:600}.rp-detail-hero p{color:#ffdebb;margin:0 0 15px;font-size:12px}.rp-detail-hero>strong{color:#ffe4a9;font-size:36px}.rp-detail-hero>strong>small{font-size:13px;font-weight:400}@media(max-width:360px){.rp-envelope{width:270px;grid-template-columns:minmax(0,1fr) 50px}.rp-envelope-copy>b{font-size:25px}.rp-envelope-copy>strong{font-size:15px}.rp-envelope-seal{width:39px;height:39px;margin-right:9px}.rp-envelope-rule{font-size:10px}}@media(prefers-reduced-motion:reduce){.rp-envelope{transition:none}.rp-envelope:hover,.rp-envelope:active{transform:none}}
.rp-envelope-seal{white-space:nowrap;line-height:1;letter-spacing:0;flex-shrink:0}.rp-envelope-seal.rp-seal-small{font-size:14px}

/* Full-height swipeable short-video feed. */
body.short-video-mode{overflow:hidden;background:#090a0b}
.short-video-mode main{position:fixed;inset:0 0 0 228px;margin:0;padding:0;max-width:none;background:#090a0b}
.short-video-mode main>header{display:none}
.short-video-mode #content{height:100%;padding:0}
.sv-shell{position:relative;height:100%;max-width:620px;margin:auto;background:#101210;color:#fff;isolation:isolate}
.sv-stack{height:100%;overflow-y:auto;overflow-x:hidden;position:relative;scroll-snap-type:y mandatory;overscroll-behavior-y:contain;touch-action:pan-y;scrollbar-width:none;-webkit-overflow-scrolling:touch;outline:none}
.sv-stack::-webkit-scrollbar{display:none}
.sv-slide{height:100%;width:100%;position:relative;scroll-snap-align:start;scroll-snap-stop:always;overflow:hidden;background:#101210}
.sv-slide video{display:block;width:100%;height:100%;object-fit:contain;background:#101210}
.sv-hit{position:absolute;inset:68px 0 90px;width:100%;display:grid;place-items:center;color:#fff}
.sv-play{font-size:54px;filter:drop-shadow(0 2px 8px #0008);opacity:.8;pointer-events:none}
.sv-top{position:absolute;inset:0 0 auto;z-index:3;padding:calc(17px + env(safe-area-inset-top)) 17px 23px;display:flex;justify-content:space-between;gap:10px;background:linear-gradient(#0009,transparent);pointer-events:none}
.sv-top>div{display:flex;align-items:center;gap:10px;min-width:0}.sv-top>div:first-child{display:block}.sv-top strong{display:block;font-size:18px;letter-spacing:1px}.sv-hint{font-size:10px;color:#eee;display:block;margin-top:5px}
.sv-top button{pointer-events:auto;color:#fff;background:#ffffff20;backdrop-filter:blur(6px);padding:9px 10px;border:1px solid #ffffff26;border-radius:20px;font-size:11px;white-space:nowrap}.sv-top button[aria-pressed=false]{background:#f6d44e;color:#17180f;border-color:#f6d44e}
.sv-caption{position:absolute;inset:auto 0 32px;padding:70px 85px 16px 18px;background:linear-gradient(transparent,#000b);pointer-events:none;text-shadow:0 1px 3px #0009}
.sv-caption button{pointer-events:auto;color:#fff;text-align:left}.sv-author{display:flex;align-items:center;gap:8px;padding:0;margin-bottom:10px;font-size:14px}.sv-author .avatar{width:30px;height:30px;background:#fff4;color:#fff;font-size:15px;text-shadow:none}.sv-title{font-size:16px;font-weight:650;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;padding:0;margin-bottom:6px}.sv-caption p{font-size:12px;line-height:1.6;margin:0;color:#eee;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.sv-actions{position:absolute;right:14px;bottom:100px;display:grid;gap:17px;z-index:2}.sv-actions>div{display:grid;justify-items:center;gap:4px}.sv-actions button{display:grid;place-items:center;min-width:46px;height:46px;border-radius:50%;background:#ffffff1c;color:white;backdrop-filter:blur(8px);font-size:24px;text-shadow:0 1px 3px #0006}.sv-actions .sv-like{font-size:17px;font-weight:650}.sv-actions .liked{color:#ff657a}.sv-actions span{font-size:11px;text-shadow:0 1px 3px #000}.sv-status{position:absolute;top:45%;left:50%;transform:translate(-50%,-50%);padding:9px 14px;border-radius:16px;background:#0009;font-size:12px;pointer-events:none}
.sv-timeline{position:absolute;inset:auto 16px 12px;display:flex;align-items:center;gap:9px;z-index:2;font-size:10px;font-variant-numeric:tabular-nums;color:#eee}.sv-timeline input{flex:1;min-width:0;accent-color:#f6d44e;height:18px;margin:0;cursor:pointer;touch-action:pan-x}.sv-timeline span{min-width:27px}
.sv-empty{position:absolute;inset:45% 20px auto;text-align:center;font-size:14px;color:#ddd;pointer-events:none}.sv-pager{position:absolute;left:calc(100% + 18px);top:50%;display:grid;gap:12px;z-index:3}.sv-pager button{height:44px;width:44px;border-radius:50%;background:#ffffff25;color:#fff;font-size:23px}
@media(max-width:1100px){.short-video-mode main{left:190px}.sv-pager{left:auto;right:12px;top:100px}}
@media(max-width:700px),(max-height:500px) and (max-width:1000px){
 .short-video-mode main{inset:0 0 calc(68px + env(safe-area-inset-bottom));height:auto}.sv-shell{max-width:none}.sv-pager{display:none}
 .short-video-mode .sidebar{inset:auto 0 0;width:100%;height:calc(68px + env(safe-area-inset-bottom));padding:0 0 env(safe-area-inset-bottom);border:0;background:#101210;backdrop-filter:none;color:#fff}
 .short-video-mode .sidebar nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0;margin:0;height:68px;width:100%}.short-video-mode .sidebar nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;padding:7px 2px;border-radius:0;font-size:10px;color:#bfc0bc}.short-video-mode .sidebar nav button span{font-size:22px}.short-video-mode .sidebar nav button.active{color:#f6d44e;background:transparent}.short-video-mode .sidebar .brand,.short-video-mode .sidebar .publish,.short-video-mode .sidebar-bottom{display:none}
 .short-video-mode #toast{bottom:calc(82px + env(safe-area-inset-bottom))}.sv-actions{right:12px}.sv-top{padding-left:15px;padding-right:15px}
}
@media(max-height:500px){.sv-top{padding-top:9px}.sv-hint{display:none}.sv-caption{padding-top:30px;padding-bottom:6px;bottom:28px}.sv-caption p{display:none}.sv-author{margin-bottom:3px;font-size:12px}.sv-author .avatar{width:23px;height:23px}.sv-title{font-size:13px;-webkit-line-clamp:1}.sv-actions{bottom:45px;gap:9px}.sv-actions button{height:35px;min-width:35px;font-size:19px}.sv-actions span{display:none}.sv-hit{inset:45px 0 70px}}
@media(prefers-reduced-motion:reduce){.sv-stack{scroll-behavior:auto}}
/* Short-video actions and comments keep the current player running. */
.sv-actions .sv-tip{color:#ffdb4d;border:1px solid #ffdb4d80;font-size:28px;font-weight:750}
.sv-comments-dialog{position:fixed;inset:auto 0 0;margin:0 auto;width:min(620px,100%);max-width:100%;height:min(48dvh,480px);max-height:70dvh;padding:0;border:0;border-radius:20px 20px 0 0;background:#fff;color:#222;overflow:hidden;box-shadow:0 -6px 30px #0003}
.sv-comments-dialog::backdrop{background:transparent}
.sv-comments-bar{display:flex;align-items:center;justify-content:space-between;padding:10px 16px;border-bottom:1px solid #eee;height:49px;box-sizing:border-box}
.sv-comments-bar button{height:30px;width:30px;border-radius:50%;background:#ffdc48;color:#111;font-size:24px;display:grid;place-items:center;padding:0}
.sv-comments-content{height:calc(100% - 49px);overflow:auto;overscroll-behavior:contain;padding:10px 16px calc(12px + env(safe-area-inset-bottom))}
.sv-comments-dialog .comments-section{max-width:none;margin:0;padding:0;border:0}
.sv-comments-dialog #comment-body{min-height:58px;height:58px}
.sv-comments-dialog .comments-public-note{margin:5px 0 8px}
@media(min-width:1001px){.sv-comments-dialog{left:228px}}
@media(max-height:500px){.sv-comments-dialog{left:auto;right:0;top:0;bottom:0;height:100dvh;max-height:100dvh;width: min(380px,48vw);border-radius:16px 0 0 16px}.sv-actions .sv-tip{font-size:23px}}
.sv-comments-dialog::backdrop{backdrop-filter:none;-webkit-backdrop-filter:none}
.short-video-mode:has(#sv-comments-dialog[open]) .sv-slide>video{height:calc(100dvh - min(48dvh,480px));top:0;bottom:auto}
@media(max-height:500px){.short-video-mode:has(#sv-comments-dialog[open]) .sv-slide>video{width:calc(100% - min(380px,48vw));height:100%;left:0;right:auto}}
/* Avoid filtering moving video frames on mobile GPUs. */
.sv-top button,.sv-actions button{backdrop-filter:none;-webkit-backdrop-filter:none;background:#252725d9}
.sv-slide{contain:layout paint;overflow-anchor:none}
.sv-stack{overflow-anchor:none}

/* The playable 3D meadow; ordinary field controls also work without WebGL. */
.farm-v3 { --farm-ink:#304c3d; --farm-cream:#fffbed; }
.farm-v3 .farm-hero { min-height:0;background:transparent;border-radius:0; }
.farm-v3 .farm-hero-copy { padding:0 0 22px; }
.farm-v3 .farm-hero h2 { margin:7px 0;font-size:30px;letter-spacing:2px; }
.farm-v3 .farm-hero p { margin:0;font-size:12px;color:#85917a; }
.farm-v3 .farm-eyebrow { font-size:10px;letter-spacing:3px; }
.farm-v3 .farm-level { position:absolute;right:0;top:28px;background:#ecf0df;border:1px solid #dce4cc;color:#597044; }
.farm-scene { position:relative;height:530px;isolation:isolate;overflow:hidden;border:1px solid #c9daba;border-radius:24px;background:radial-gradient(ellipse at 35% 30%,#f4f0d2 0,#e3e9c9 38%,#b8d2b6 100%);box-shadow:0 12px 35px #315d3310,inset 0 0 60px #ffffff50; }
.farm-scene canvas { display:block;width:100%;height:100%;touch-action:pan-y;cursor:grab; }
.farm-scene canvas:active { cursor:grabbing; }
.farm-scene-heading { position:absolute;left:26px;top:25px;pointer-events:none;display:flex;flex-direction:column;gap:8px;color:#4e6b4d; }
.farm-scene-heading>span { font-size:10px;letter-spacing:3px;opacity:.75; }
.farm-scene-heading>strong { font-size:19px;letter-spacing:2px;font-weight:500; }
.farm-scene-weather { position:absolute;right:24px;top:23px;padding:9px 12px;border-radius:18px;background:#fffcef9c;border:1px solid #fff9e7;color:#66794f;font-size:11px;pointer-events:none; }
.farm-scene-weather>span { color:#c89c36;margin-right:4px; }
.farm-scene-controls { position:absolute;right:16px;bottom:68px;display:flex;flex-direction:column;gap:5px; }
#points-page .farm-scene-controls button { width:35px;height:35px;min-width:0;padding:0;border:1px solid #fff9e6;border-radius:10px;background:#fffbeddf;color:#57704b;box-shadow:0 2px 5px #38523012;font-size:21px; }
#points-page .farm-scene-controls button:hover { background:#fffdf2;transform:translateY(-1px); }
.farm-scene-controls button:focus-visible,.farm-plot-selector button:focus-visible { outline:3px solid #466c48;outline-offset:2px; }
.farm-scene-footer { position:absolute;bottom:0;left:0;right:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:19px 24px;background:linear-gradient(transparent,#e1e9cce8);pointer-events:none; }
.farm-scene-footer>span { font-size:11px;color:#576e4b;line-height:1.6; }
.farm-scene-footer .farm-scene-caption { font-size:10px;color:#74896b; }
.farm-scene-unavailable { height:170px; }.farm-scene-unavailable canvas,.farm-scene-unavailable .farm-scene-controls,.farm-scene-unavailable .farm-scene-caption { display:none; }
.farm-v3 .farm-toolbar { padding:20px 4px 12px; }.farm-v3 .farm-toolbar strong { font-size:24px; }
.farm-v3 .farm-rule-note { background:#f7f7ed;border:1px solid #e6e9d8;color:#7b8269;padding:10px 14px;font-size:11px; }
.farm-v3 .farm-rule-note summary { cursor:pointer; }
.farm-plot-selector { display:flex;gap:7px;flex-wrap:wrap;margin:0 0 16px; }
#points-page .farm-plot-selector button { background:#f2f5e8;color:#698056;border:1px solid #dce6cc;border-radius:20px;font-size:11px;padding:8px 12px; }
#points-page .farm-plot-selector button[aria-pressed=true] { background:#4d7250;color:#fff7db;border-color:#4d7250; }
.farm-v3 .farm-plots { background:#f1f3e7;border-color:#e1e7d2;gap:14px; }
#points-page .farm-v3 .farm-plot { background:linear-gradient(150deg,#a27e51,#81623d);border-color:#c2a373;border-radius:16px;box-shadow:0 4px 0 #705533,0 7px 10px #42341115; }
#points-page .farm-v3 .farm-expand { color:#65804e;background:#e9eed9;border:1px dashed #b3c397;box-shadow:none; }
#points-page .farm-v3 .farm-selected-plot { border-color:#fff0aa;outline:3px solid #7e9d55;outline-offset:3px; }
.farm-v3 .farm-garden .farm-pet-walkers { position:relative;height:110px;margin-top:12px;background:linear-gradient(#eef2e0,#e2eacb); }
.farm-v3 .farm-garden .farm-pet-walkers:empty { display:none; }
.farm-v3 .farm-garden .farm-walker { top:0!important;--farm-walker-size:100px; }
@media(max-width:600px) {
 .farm-v3 .farm-hero-copy { padding:0 0 18px; }.farm-v3 .farm-hero h2 { font-size:25px; }.farm-v3 .farm-hero p { max-width:180px;line-height:1.7; }
 .farm-v3 .farm-level { top:30px;padding:6px 8px;font-size:10px; }
 .farm-scene { height:400px;border-radius:19px; }.farm-scene-heading { left:16px;top:20px; }.farm-scene-heading>strong { font-size:15px;letter-spacing:1px; }.farm-scene-heading>span { font-size:9px;letter-spacing:1px; }
 .farm-scene-weather { right:12px;top:16px;padding:7px 8px;font-size:9px; }.farm-scene-controls { bottom:52px;right:10px;gap:5px; }
 #points-page .farm-scene-controls button { width:30px;height:30px;font-size:19px; }
 .farm-scene-footer { padding:16px; }.farm-scene-footer>span { font-size:10px; }.farm-scene-footer .farm-scene-caption { display:none; }
 .farm-v3 .farm-plots { gap:14px 10px;padding:12px 10px 20px; }.farm-v3 .farm-content { padding-top:18px; }.farm-scene-unavailable { height:190px; }
}

/* One continuous, full-screen farm. Every field action lives inside the world. */
.farm-v4 .farm-scene { position:fixed;inset:0;z-index:120;width:100%;height:100dvh;min-height:0;border:0;border-radius:0;background:#b2d4cb;box-shadow:none; }
body:has(#farm-section:not([hidden]) .farm-v4) { overflow:hidden; }
.farm-v4 .farm-scene canvas { touch-action:none; }
.farm-v4 .farm-scene-ui { position:absolute;inset:0;z-index:3;pointer-events:none; }
.farm-scene-ui button,.farm-scene-ui summary,.farm-scene-ui details,.farm-inspector,.farm-world-panel { pointer-events:auto; }
.farm-world-top { display:flex;align-items:center;gap:13px;position:absolute;left:max(22px,env(safe-area-inset-left));right:22px;top:max(20px,env(safe-area-inset-top));color:#fff9e6;text-shadow:0 2px 6px #203c2e70; }
#points-page .farm-world-back,#points-page .farm-world-help { width:42px;height:42px;border:1px solid #e0e8bf80;border-radius:50%;background:#284e42c9;color:#ffedba;font-size:28px;padding:0; }
#points-page .farm-world-help { font-size:19px;width:36px;height:36px; }
.farm-world-title { display:flex;flex-direction:column;gap:5px; }.farm-world-title strong { font-size:21px;letter-spacing:3px; }.farm-world-title>span { font-size:11px;color:#f3e3b3; }
.farm-world-balance { display:flex;align-items:center;gap:12px;margin-left:auto;padding:9px 16px;background:#254638b3;border:1px solid #d1d7a951;border-radius:22px; }.farm-world-balance small { font-size:11px; }.farm-world-balance b { color:#ffe1a0;font-size:18px; }
.farm-world-fields { position:absolute;top:89px;left:23px;color:#fff1cb;font-size:12px;max-width:220px; }.farm-world-fields summary { cursor:pointer;list-style:none;border:1px solid #e4dfb854;border-radius:20px;background:#345a45bd;padding:9px 16px; }.farm-world-fields>div { display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-top:8px;background:#f9f4e5f5;border-radius:14px;padding:10px;max-height:55dvh;overflow:auto; }
#points-page .farm-world-fields button { font-size:11px;padding:9px 6px;border:0;border-radius:6px;background:#e4ebd3;color:#4b6445;white-space:nowrap; }
.farm-world-actions { position:absolute;right:22px;top:110px;display:flex;flex-direction:column;gap:10px; }
#points-page .farm-world-actions button { border:1px solid #e6dfb39c;border-radius:15px;background:#35563ede;color:#fff0ba;padding:12px 17px;font-size:12px;box-shadow:0 3px 12px #29412830; }
.farm-world-actions small { display:block;margin-top:4px;font-size:10px;opacity:.8; }
#points-page .farm-world-actions .farm-world-harvest { background:#e5c071;color:#4d462b; }
.farm-world-actions button:disabled { opacity:.55; }
.farm-world-dock { position:absolute;bottom:max(20px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);display:flex;gap:6px;padding:6px 15px;background:#224e42e3;border:1px solid #c3cead7a;border-radius:24px;box-shadow:0 8px 30px #18392b35; }
#points-page .farm-world-dock button { display:flex;align-items:center;gap:8px;min-width:85px;justify-content:center;padding:11px 16px;background:transparent;color:#dbe8ce;border:0;border-radius:17px;font-size:13px; }
.farm-world-dock button>span { font-size:22px;line-height:1; }
#points-page .farm-world-dock button[aria-pressed=true] { background:#eed59a;color:#4b5638; }
.farm-v4 .farm-scene-controls { z-index:3;right:22px;bottom:22px;flex-direction:row;gap:6px; }
#points-page .farm-v4 .farm-scene-controls button { border-color:#d7debd70;background:#345542c9;color:#ffedbe;border-radius:50%;width:36px;height:36px; }
.farm-world-hint { position:absolute;left:23px;bottom:25px;z-index:2;max-width:230px;font-size:11px;color:#fff8d8;text-shadow:0 1px 4px #254a35;line-height:1.6;pointer-events:none; }
.farm-v4 .farm-status { position:absolute;bottom:95px;left:50%;transform:translateX(-50%);background:#294b3be8;color:#fff5d4;padding:9px 16px;border-radius:20px;font-size:12px;white-space:nowrap;min-height:0;margin:0; }.farm-v4 .farm-status:empty { display:none; }
.farm-map-labels { position:absolute;inset:0;pointer-events:none;z-index:2;overflow:hidden; }
#points-page .farm-map-labels button { position:absolute;left:0;top:0;pointer-events:auto;min-width:32px;min-height:28px;padding:4px 9px;border:1px solid #ebe9c590;border-radius:12px;background:#39573cb8;color:#fff9da;font-size:11px;white-space:nowrap;box-shadow:0 2px 7px #274a3035; }
#points-page .farm-map-labels button[aria-pressed=true] { background:#f3d48a;color:#4a452d;border-color:#fff3b2; }
.farm-inspector,.farm-world-panel { position:absolute;right:22px;bottom:92px;width:320px;max-height:calc(100dvh - 195px);overflow:auto;background:#fcf6e8f5;border:1px solid #fff2c5;border-radius:20px;box-shadow:0 12px 40px #233d393b;color:#355242;overscroll-behavior:contain; }
.farm-inspector>header,.farm-world-panel>header { display:flex;justify-content:space-between;align-items:center;padding:14px 17px;border-bottom:1px solid #dedfca;gap:10px; }.farm-inspector>header strong,.farm-world-panel>header strong { font-size:15px; }
#points-page .farm-inspector>header button,#points-page .farm-world-panel>header button { border:0;background:transparent;font-size:23px;color:#6f7e5b;padding:0 5px; }
#points-page .farm-v4 .farm-inspector .farm-plot { padding:15px 18px;min-height:0;background:transparent;border:0;border-radius:0;box-shadow:none;color:#405c43;outline:none;align-items:stretch;gap:9px; }
.farm-inspector .farm-plot>.farm-crop-svg,.farm-inspector .farm-empty-sprout,.farm-inspector .farm-plot>small:first-child { display:none; }
.farm-inspector .farm-plot>strong { font-size:14px; }.farm-inspector .farm-plot small { color:#687b59;font-size:12px; }.farm-inspector .farm-next-care { color:#6b805e; }
.farm-v4 .farm-inspector .farm-care-alert { color:#985139!important;background:#f2dfbf;padding:7px; }.farm-inspector .farm-growth { width:100%;height:6px;background:#dce3c9; }
#points-page .farm-inspector .farm-plot>button { margin:0;padding:10px 12px;min-height:40px;background:#597b4f;color:#fff3ce;border-radius:10px; }.farm-inspector .farm-care-buttons { justify-content:stretch; }.farm-inspector .farm-care-buttons button { flex:1;min-height:40px;font-size:12px; }
.farm-pocket { padding:0 18px 16px; }.farm-pocket>span { display:block;font-size:10px;color:#7c896c;margin-bottom:8px; }.farm-pocket>div { display:flex;gap:6px;overflow:auto;padding-bottom:7px; }
#points-page .farm-pocket [data-farm-seed-select] { flex-shrink:0;border:1px solid #d7dec1;background:#eff1df;border-radius:9px;color:#688055;padding:9px;font-size:11px; }.farm-pocket b { font-weight:400; }.farm-pocket [aria-pressed=true] { outline:2px solid #769461; }
#points-page .farm-pocket-shop { width:100%;border:0;background:transparent;font-size:11px;color:#698154;padding:6px; }
.farm-world-panel { width:440px;top:86px;bottom:92px;max-height:none;display:flex;flex-direction:column; }.farm-world-panel>header { flex-shrink:0; }.farm-world-panel-body { padding:16px;overflow:auto;overscroll-behavior:contain; }.farm-world-panel .farm-seed-shop { margin:0; }.farm-world-panel .farm-crops { grid-template-columns:repeat(2,minmax(0,1fr)); }.farm-world-panel .farm-section-title { padding:0; }.farm-world-panel .farm-pet-products { grid-template-columns:repeat(2,minmax(0,1fr)); }.farm-world-panel-body>p { font-size:13px;line-height:1.9; }
.farm-v4 .farm-scene-unavailable canvas { display:none; }.farm-v4 .farm-scene-unavailable { background:linear-gradient(145deg,#769b74,#395f51); }.farm-v4 .farm-scene-unavailable .farm-world-hint { bottom:100px; }
@media(max-width:700px) {
 .farm-world-top { left:12px;right:12px;top:max(12px,env(safe-area-inset-top));gap:8px; }.farm-world-title strong { font-size:17px;letter-spacing:1px; }.farm-world-title>span { font-size:10px; }
 #points-page .farm-world-back { width:33px;height:33px;font-size:24px; }.farm-world-balance { gap:4px;padding:8px 10px;flex-direction:column; }.farm-world-balance b { font-size:14px; }.farm-world-balance small { font-size:8px; }#points-page .farm-world-help { width:28px;height:28px;font-size:15px; }
 .farm-world-fields { top:82px;left:12px; }.farm-world-fields summary { padding:7px 11px;font-size:10px; }
 .farm-world-actions { right:12px;top:88px;gap:7px; }#points-page .farm-world-actions button { padding:9px 10px;font-size:10px;max-width:80px; }.farm-world-actions small { font-size:9px; }
 .farm-world-dock { bottom:max(12px,env(safe-area-inset-bottom));gap:2px;padding:5px 8px;border-radius:20px; }#points-page .farm-world-dock button { min-width:58px;gap:3px;flex-direction:column;font-size:10px;padding:8px 11px;border-radius:15px; }.farm-world-dock button>span { font-size:20px; }
 .farm-v4 .farm-scene-controls { right:12px;bottom:92px;flex-direction:column;gap:5px; }#points-page .farm-v4 .farm-scene-controls button { width:30px;height:30px;font-size:17px; }
 .farm-world-hint { left:12px;bottom:90px;font-size:9px;max-width:160px; }.farm-inspector { left:12px;right:12px;bottom:90px;width:auto;max-height:42dvh; }.farm-inspector>header { padding:10px 14px; }.farm-inspector>header strong { font-size:13px; }
 #points-page .farm-v4 .farm-inspector .farm-plot { padding:10px 14px;gap:7px; }.farm-pocket { padding:0 14px 9px; }.farm-inspector .farm-plot strong { font-size:12px; }.farm-inspector .farm-plot small { font-size:11px; }
 .farm-world-panel { left:12px;right:12px;top:78px;bottom:89px;width:auto; }.farm-world-panel-body { padding:13px; }.farm-scene:has(.farm-inspector) .farm-scene-controls,.farm-scene:has(.farm-inspector) .farm-world-hint,.farm-scene:has(.farm-world-panel) .farm-scene-controls { visibility:hidden; }
 #points-page .farm-map-labels button { min-width:28px;min-height:28px;font-size:10px;padding:4px 6px; }.farm-map-labels button span { display:none; }
 .farm-v4 .farm-status { bottom:77px;font-size:10px;padding:5px 10px;max-width:90%;white-space:normal; }
}
@media(max-height:500px) and (min-width:701px) { .farm-world-panel { top:65px;bottom:75px; }.farm-inspector { bottom:75px;max-height:calc(100dvh - 95px);width:280px; }.farm-world-actions { top:80px; }.farm-world-dock { bottom:10px; }.farm-world-top { top:10px; } }
.farm-v4 { min-height:1px; }

/* Mahjong speech language selector */
.mj-language-choice { display: grid; gap: 4px; font-size: 12px; text-align: left; }
.mj-room-actions .mj-language-choice select { width: 100%; min-width: 0; min-height: 36px; padding: 4px 6px; }

/* Woyo home-screen installation */
.app-install-footer{display:flex;justify-content:center;padding:28px 0 12px}
#install-app{display:inline-flex;align-items:center;gap:9px;min-height:44px;padding:8px 18px;border:1px solid #e9ece4;border-radius:24px;background:#fff;font-size:13px;color:#626c56}
#install-app img{border-radius:8px}
#install-app:hover{background:#f7f3de}
#install-dialog .install-logo{border-radius:16px;margin-bottom:18px}
#install-dialog h2{font-size:21px}
#install-steps{padding-left:23px;margin-bottom:0;color:#4c5542;font-size:14px;line-height:1.9}
#install-steps li+li{margin-top:12px}
.short-video-mode .app-install-footer{display:none}
