/* Shared layout rules follow the feature styles, including the native wrapper. */
:root { --nav-width:560px; }
#content,#topbar { min-width:0; }
#content h1,#content h3,.settings-head>*,.primary,.secondary { overflow-wrap:anywhere; }
.primary,.secondary { min-height:48px;white-space:normal;line-height:1.4; }
.settings-head { gap:12px;flex-wrap:wrap; }
.settings-group { border-radius:8px;box-shadow:none; }
.setting-row { grid-template-columns:24px minmax(0,1fr) auto; }
.setting-field { grid-template-columns:24px minmax(0,1fr);gap:8px 12px; }
.setting-field>input,.setting-field>textarea,.setting-field>select { grid-column:2;min-height:46px;font-size:16px; }
.range-setting>.range-row { min-width:0; }
.range-row input { font-size:16px;min-height:46px; }
.profile-tools button,.passport-profile-entry button { white-space:normal; }
.profile-tools svg,.passport-profile-entry svg { flex:none; }
.settings-link { min-width:0;overflow-wrap:anywhere; }
.settings-link span { min-width:0; }
.conversation-header h1 { line-height:1.4; }
.conversation-header .row-action { width:40px;height:40px; }
.message-form textarea { line-height:1.45; }
.message-bubble { min-width:0; }
.message-bubble p { unicode-bidi:plaintext; }
.message-bubble time { text-align:end; }
.chat-media-controls { flex-wrap:wrap; }
.chat-media-controls .row-action { width:44px;height:44px; }
.chat-emoji button { width:44px;height:44px; }
.photo-edit-controls .row-action { min-height:40px; }
.settings-language select,.profile-settings>select { font-size:16px; }
.passport-owner-identity .profile-photo>.avatar { width:100%;height:100%;border-radius:6px; }
.passport-owner-identity .photo-placeholder { min-height:100%; }
.card-copy { max-height:calc(100% - 60px);overflow-y:auto;scrollbar-width:thin; }
.card-copy h2 { overflow-wrap:anywhere; }
.card-copy .card-location { max-width:100%; }
.card-copy .card-location svg { flex:none; }
.view-tabs button { line-height:1.35; }
#tabs { width:min(100%,var(--nav-width)); }
#tabs button { align-content:start;grid-template-rows:25px auto;gap:6px; }
#tabs button[aria-current=page] { background:#ff2daa12; }
[dir=rtl] .switch span:after { left:auto;right:3px; }
[dir=rtl] .switch input:checked+span:after { transform:translateX(-22px); }
[dir=rtl] .match-faces .avatar+.avatar { margin-left:0;margin-right:-20px; }
[dir=rtl] .match-feature .avatar+.avatar { margin-right:-15px; }

@media(max-width:350px) {
  .setting-row { padding-inline:10px;gap:8px; }
  .setting-row label { font-size:14px; }
  .location-pagination { flex-wrap:wrap; }
  .profile-tools { gap:8px; }
  .profile-tools button { font-size:13px; }
  .message-bubble { max-width:94%;padding:10px; }
  .referral-link-row { gap:5px; }
}
@media(min-width:760px) {
  :root { --nav-width:720px; }
  .shell { width:min(100%,720px);padding-inline:28px; }
  .brand { font-size:48px; }
  .location span { max-width:180px; }
  #content>h1 { margin-block:24px; }
  .profile-settings { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start; }
  .profile-settings>.settings-group { margin:0; }
  .profile-settings>.settings-group:nth-of-type(3),.profile-settings>.save-wrap,.profile-settings>select { grid-column:1/-1; }
  .profile-settings>.save-wrap { padding:0; }
  .card-stage { max-width:460px;margin-inline:auto; }
  .card-stage:before,.card-stage:after { inset:12px -6px -8px 9px; }
  .new-profiles { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .new-profile { grid-template-columns:76px minmax(0,1fr) 36px;gap:8px;padding:8px; }
  .new-profile .row-action { width:36px;height:40px; }
  .new-profile h2 { font-size:17px; }
  .passport-cities { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .passport-owner-identity { grid-template-columns:160px minmax(0,1fr);gap:28px;padding:22px; }
  .passport-owner-identity .profile-heading { text-align:start; }
  .passport-owner-identity .profile-metrics { justify-content:flex-start; }
  .passport-owner-identity .profile-mood { margin-inline:0; }
  .adventure-game-heading { grid-template-columns:180px minmax(0,1fr); }
  .adventure-gifts { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .adventure-awards { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .message-bubble { max-width:76%; }
}
@media(min-width:1100px) and (min-height:650px) {
  .shell,.world-open .shell { width:min(calc(100% - 244px),960px);margin-inline-start:calc(220px + max(0px,(100% - 1200px)/2));margin-inline-end:24px;padding-inline:32px;padding-bottom:calc(28px + var(--app-bottom)); }
  #tabs { top:var(--app-top);bottom:auto;left:max(16px,calc((100% - 1200px)/2));right:auto;transform:none;width:184px;padding:12px;border:1px solid #46303e;border-radius:8px;display:flex;flex-direction:column;gap:6px;box-shadow:none;backdrop-filter:none;background:#100b12; }
  #tabs button { display:grid;grid-template-columns:25px minmax(0,1fr);grid-template-rows:auto;align-items:center;justify-items:start;text-align:start;min-height:54px;padding:10px;gap:12px;font-size:13px; }
  #tabs button[aria-current=page] { background:#3a162d;color:#ff8bcc; }
  [dir=rtl] #tabs { left:auto;right:max(16px,calc((100% - 1200px)/2)); }
  .conversation-open #content { height:calc(var(--app-height) - 90px - var(--app-top) - var(--app-bottom));min-height:300px; }
  #notice { bottom:calc(24px + var(--app-bottom) + var(--viewport-bottom,0px)); }
  .adventure-activities { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .passport-stamps { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .world-map { height:480px; }
}
@media(forced-colors:active) {
  .brand,.match-title { color:CanvasText;background:none;text-shadow:none; }
  button[aria-pressed=true],#tabs button[aria-current=page] { outline:2px solid Highlight; }
}
