* { box-sizing: border-box; }
:root { --visible-viewport-top: 0px; --visible-viewport-height: 100vh; }
@supports (height: 100dvh) { :root { --visible-viewport-height: 100dvh; } }
[hidden] { display: none !important; }
body { margin: 0; background: #e9dcc1; color: #3c322a; font: 16px system-ui, sans-serif; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.stage { position: fixed; inset: 0; background: linear-gradient(#a096d9,#f4cde3 56%,#c0be9e); }
canvas { display: block; width: 100%; height: 100%; touch-action: none; }
#welcome { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 2.5rem max(1.25rem,9vw); color: #fff6e9; background: linear-gradient(90deg,#2d2443f5 0%,#3b2b50dc 28%,#51406581 50%,#51406512 77%); }
.welcome-brand { display: flex; align-items: center; gap: .5rem; margin: 0 0 1.35rem; color: #fff3e1; font-size: .95rem; font-weight: 700; letter-spacing: -.035em; }
.welcome-brand svg { width: 24px; height: 24px; fill: #f1d7b3; }
.welcome-content { width: min(100%,30rem); }
.welcome-tag { display: flex; align-items: center; gap: .7rem; margin: 0 0 .9rem; color: #f3d8b9; font-size: .77rem; letter-spacing: .13em; font-weight: 650; }
.welcome-tag::before { content: ""; width: 1.2rem; height: 1px; background: currentColor; }
#welcome-title { margin: 0; font-family: "Batang","Noto Serif KR",serif; font-size: clamp(2.6rem,5vw,4.55rem); font-weight: 500; line-height: 1.22; letter-spacing: -.075em; }
#welcome-title em { font-style: normal; color: #f4d5a9; }
#welcome-title em { display: inline-block; font-size: .68em; line-height: 1.4; word-break: keep-all; }
.welcome-copy { margin: 1.15rem 0 1.45rem; line-height: 1.85; color: #f6e8f4; font-size: clamp(.93rem,1.45vw,1.1rem); }
.welcome-caption { margin: .7rem 0 0; color: #eaddee; font-size: .77rem; line-height: 1.5; }
#entry-status:empty, #entry-recovery-status:empty, #arrival-notice:empty, #status:empty { display: none; }
#entry-status, #entry-noscript { margin: .55rem 0 0; color: #fff5ec; font-size: .83rem; line-height: 1.5; }
#entry-recovery, #entry-noscript { width: min(100%,25rem); border: 1px solid #e7cde680; border-radius: .75rem; padding: .6rem .7rem; background: #30263ae8; word-break: keep-all; overflow-wrap: anywhere; }
#entry-recovery { position: fixed; z-index: 3; top: calc(var(--visible-viewport-top) + var(--visible-viewport-height) - max(.8rem,env(safe-area-inset-bottom))); left: 50%; transform: translate(-50%,-100%); width: min(calc(100% - 1.6rem),25rem); max-height: calc(var(--visible-viewport-height) - 1.6rem); overflow: auto; color: #fff5ec; box-shadow: 0 6px 24px #23182d55; }
#entry-recovery p { margin: 0 0 .5rem; font-size: .8rem; line-height: 1.5; }
#entry-recovery-message { font-weight: 700; }
#entry-recovery #entry-recovery-status { margin: .45rem 0 0; color: #f4d5a9; }
.entry-recovery-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.entry-recovery-actions button { flex: 1 0 auto; color: #45324e; font-size: .85rem; font-weight: 650; }
.world-label, .world-dock, .world-notices, #move-control, #call-intro { position: fixed; }
.world-label { top: max(.8rem,env(safe-area-inset-top)); left: max(.8rem,env(safe-area-inset-left)); display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; column-gap: .5rem; row-gap: .25rem; max-width: min(47vw,22rem); padding: .6rem; border: 1px solid #fffaf1e6; border-radius: 1.1rem; background: #fff8edee; color: #51465c; box-shadow: 0 3px 14px #51405f12; backdrop-filter: blur(8px); }
.world-brand { grid-column: 1 / -1; color: #78677d; font-size: .63rem; line-height: 1.3; font-weight: 600; letter-spacing: .035em; }
.world-place { min-width: 0; }
.world-label h2 { margin: 0; font-size: .95rem; font-weight: 700; line-height: 1.35; word-break: keep-all; overflow-wrap: anywhere; }
.world-label #guardian-name { margin: .2rem 0 0; color: #766678; font-size: .65rem; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.world-label #guardian-name:empty { display: none; }
.world-label #district { grid-column: 1 / -1; margin: .1rem 0 0; padding-top: .3rem; border-top: 1px solid #dfd2e3; color: #766678; font-size: .65rem; line-height: 1.4; }
.world-notices { top: max(1rem,env(safe-area-inset-top)); right: max(1rem,env(safe-area-inset-right)); max-width: min(46vw,24rem); pointer-events: none; }
.world-notices > * { background: #fffaf2df; border-radius: .72rem; padding: .4rem .63rem; margin: 0 0 .35rem; font-size: .82rem; line-height: 1.45; word-break: keep-all; overflow-wrap: anywhere; }
#facility-notice { background: #f3e7f8ed; color: #4f3762; border: 1px solid #e7d6f3; border-left: 3px solid #987cb4; font-weight: 650; }
#self-tag { position: fixed; left: 0; top: 0; z-index: 1; transform: translate(-50%,calc(-100% - 8px)); max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; padding: .23rem .52rem; border: 1px solid #fff9f1bf; border-radius: 1rem; background: #f0e6f8df; color: #483557; font-size: .7rem; font-weight: 650; }
#greeting-bubble { position: fixed; left: 0; top: 0; z-index: 1; transform: translate(-50%,calc(-100% - 12px)); max-width: min(12.5rem,calc(100vw - 24px)); width: max-content; padding: .5rem .75rem; border: 1px solid #fffaf2; border-radius: .9rem; background: #fff4e1; color: #523d55; box-shadow: 0 3px 16px #49365f26; text-align: center; font-size: .83rem; font-weight: 650; line-height: 1.4; word-break: keep-all; pointer-events: none; }
#greeting-bubble[data-speaker="neighbor"] { background: #f2e6fb; }
#greeting-bubble::after { position: absolute; top: calc(100% - 3px); left: var(--bubble-tail,50%); width: 9px; height: 9px; transform: translateX(-50%) rotate(45deg); border-right: 1px solid #fffaf2; border-bottom: 1px solid #fffaf2; background: inherit; content: ""; }
.world-dock { bottom: calc(.65rem + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: .5rem; width: max-content; max-width: calc(100% - 8.6rem); }
.dock-panel { display: flex; align-items: stretch; gap: .24rem; max-width: 100%; padding: .29rem; border: 1px solid #fffcf2bf; border-radius: 1.1rem; background: #faf2e1df; box-shadow: 0 6px 22px #30264d30; backdrop-filter: blur(8px); }
#residents { display: flex; align-items: stretch; gap: .24rem; min-width: 0; }
.dock-panel button { display: flex; align-items: center; justify-content: center; gap: .45rem; min-width: 0; padding: .55rem .8rem; border-color: transparent; border-radius: .82rem; background: transparent; color: #3d5140; font-size: .85rem; font-weight: 650; }
.dock-panel button:hover { background: #e4e6d4; }
.dock-panel button[aria-pressed="true"] { background: #dfe6d2; }
.dock-panel button.dock-primary { background: #ddd0f2; color: #49365f; }
.dock-panel button.dock-primary:hover { background: #e6daf8; }
.main-dock #call-pet { min-height: 44px; border: 1px solid #d5bedf; background: #eee1f2; color: #634775; }
.main-dock #call-pet .bring-pet-icon { width: 25px; height: 25px; padding: 2px; fill: currentColor; stroke: none; }
.main-dock #call-pet:hover { background: #e3d1ec; }
.main-dock #call-pet:focus-visible { outline: 3px solid #745633; outline-offset: 3px; }
.dock-panel button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock-panel svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.care-dock { background: #fff8eaf5; }
.world-dock:has(#cancel:not([hidden])) :is(.main-dock,#greet,#snack),
.world-dock:has(.main-dock > #call-pet[aria-expanded="true"]) .main-dock,
.world-dock:has(#rest-dock:not([hidden])) .main-dock { display: none; }
button { min-height: 44px; max-width: 100%; border: 1px solid #a69885; border-radius: .65rem; padding: .55rem .8rem; color: inherit; background: #fffaf2; font: inherit; cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
#entry, #call-intro { border: 1px solid #ded1be; border-radius: 1rem; background: #fffaf2; padding: 1rem; }
#entry { width: min(100%,25rem); padding: .88rem 0 0; border: 0; border-top: 1px solid #efd9ec56; border-radius: 0; background: transparent; }
#entry label { font-size: .82rem; color: #fff1e5; }
#entry :is(input,select) { border-color: #e2cfe678; background: #fffbf5f2; color: #43344c; }
#enter { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; border-color: #f2ddb9; background: #f2dcb7; color: #45324e; font-weight: 700; }
#enter:hover { background: #f9e9cf; }
.entry-fields { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: .65rem; margin-bottom: .85rem; }
.entry-fields label { display: block; margin-bottom: .3rem; font-weight: 600; }
input, select { width: 100%; min-height: 44px; padding: .45rem .6rem; border: 1px solid #a69885; border-radius: .5rem; background: #fff; font: inherit; color: inherit; }
#call-intro { inset: auto auto auto 50%; top: calc(var(--visible-viewport-top) + var(--visible-viewport-height) / 2); transform: translate(-50%,-50%); display: flex; flex-direction: column; width: min(calc(100% - 2rem),37rem); max-height: calc(var(--visible-viewport-height) - 2rem); overflow: hidden; z-index: 2; padding: 1rem; background: #fffbf5; box-shadow: 0 12px 48px #473c3555; }
#call-form { display: flex; flex-direction: column; min-height: 0; }
.call-scroll { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: .22rem; }
.call-heading { margin: 0 0 .85rem; }
.call-kicker { margin: 0 0 .22rem; color: #745686; font-size: .75rem; font-weight: 700; }
#call-title { margin: 0 0 .28rem; font-size: clamp(1.24rem,4vw,1.55rem); overflow-wrap: anywhere; }
.call-heading > p:last-child { margin: 0; line-height: 1.5; font-size: .87rem; }
#call-form .entry-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
#call-form label { font-size: .84rem; }
.call-photos { min-width: 0; margin: .12rem 0 0; padding: .6rem .7rem .7rem; border: 1px solid #e3d5ec; border-radius: .75rem; background: #f8f0fb; }
.call-photos legend { padding: 0 .25rem; color: #533b66; font-size: .83rem; font-weight: 700; }
.photo-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .6rem; }
.photo-fields input { padding: .25rem; }
.photo-fields input::file-selector-button { min-height: 34px; margin-inline-end: .35rem; padding: .3rem .45rem; border: 0; border-radius: .35rem; background: #e9def2; color: #48365b; font: inherit; font-size: .8rem; cursor: pointer; }
#call-note { margin: 0 0 .7rem; color: #655569; line-height: 1.5; font-size: .78rem; }
.call-actions { display: flex; gap: .5rem; padding: .6rem .22rem 0; border-top: 1px solid #e7ddea; }
.call-feedback { flex: none; max-height: min(28vh,10rem); overflow: auto; }
.call-feedback :is(#call-error,#call-note) { margin: .4rem .22rem; }
.call-feedback #call-note:empty { display: none; }
.call-actions button[type="submit"] { flex: 1; min-height: 48px; border-color: #d6c2e9; background: #e8daf4; color: #453353; font-weight: 750; }
.full-width { grid-column: 1 / -1; }
@media (max-width: 36rem) {
  #call-form .entry-fields, .photo-fields { grid-template-columns: minmax(0,1fr); }
  #call-intro { padding: .95rem; max-height: calc(var(--visible-viewport-height) - 1.25rem - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
}
#district { margin: .25rem 0 0; color: #e9d9f5; font-size: .72rem; font-weight: 650; overflow-wrap: anywhere; }
:is(button, input, select):focus-visible { outline: 3px solid #745633; outline-offset: 2px; }
#move-control { bottom: max(1rem,env(safe-area-inset-bottom)); left: max(1rem,env(safe-area-inset-left)); text-align: center; }
#move-stick { position: relative; width: 80px; height: 80px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid #fffaf2b3; background: #3b2f5380; touch-action: none; user-select: none; cursor: grab; box-shadow: inset 0 0 0 7px #e8d9f21c,0 4px 16px #52473226; }
#move-stick:active { cursor: grabbing; }
#move-stick svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: #fff4dfb3; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
#move-stick span { width: 30px; height: 30px; border: 1px solid #fff9eaa8; border-radius: 50%; background: radial-gradient(circle at 35% 30%,#fff4dc,#c6aedb); box-shadow: 0 2px 7px #32254273; pointer-events: none; transform: translate(var(--stick-x,0),var(--stick-y,0)); }
#move-hint { margin: .28rem 0 0; font-size: .7rem; font-weight: 650; background: #fffaf2df; padding: .18rem .36rem; border-radius: 1rem; }
.touch-hint { display: none; }
@media (any-pointer: coarse) { .touch-hint { display: inline; } .key-hint { display: none; } }
@media (max-width: 42rem) {
  #welcome { align-items: center; padding: max(6.75rem,26vh) max(1.35rem,env(safe-area-inset-right)) calc(1.2rem + env(safe-area-inset-bottom)) max(1.35rem,env(safe-area-inset-left)); padding-top: max(6.75rem,26dvh); background: linear-gradient(0deg,#302541 3%,#36294aee 31%,#463657c9 54%,#4231545e 72%,#30254112 93%); }
  .welcome-content { width: min(100%,25rem); }
  .welcome-brand { margin-bottom: .9rem; }
  #welcome-title { font-size: clamp(2rem,9.8vw,3.5rem); }
  .welcome-copy { margin: .65rem 0 .9rem; }
  #entry .entry-fields { grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); gap: .5rem; }
  .world-label { top: calc(.6rem + env(safe-area-inset-top)); left: max(.6rem,env(safe-area-inset-left)); }
  .world-notices { top: calc(.6rem + env(safe-area-inset-top)); right: max(.6rem,env(safe-area-inset-right)); max-width: min(44vw,19rem); }
  .world-notices > * { padding: .36rem .48rem; font-size: .75rem; }
  .world-dock { width: max-content; max-width: calc(100% - max(.65rem,env(safe-area-inset-left)) - max(.65rem,env(safe-area-inset-right))); }
  .main-dock button { flex-direction: column; gap: .22rem; font-size: .71rem; padding: .3rem .46rem; min-width: 44px; min-height: 50px; }
  .main-dock > button, #residents > button { flex: 0 1 auto; }
  .main-dock button span { max-width: min(25vw,11rem); }
  .care-dock { align-self: flex-end; }
  .care-dock button { font-size: .76rem; padding-inline: .55rem; }
  .care-dock svg { width: 17px; height: 17px; }
  #move-control { bottom: calc(4.7rem + env(safe-area-inset-bottom)); left: max(.7rem,env(safe-area-inset-left)); }
  #move-stick { width: 68px; height: 68px; }
  #move-hint { font-size: .63rem; padding: .2rem .28rem; }
}
@media (max-height: 460px) {
  #welcome { padding-block: max(1rem,env(safe-area-inset-top)) max(.65rem,env(safe-area-inset-bottom)); }
  .welcome-brand { margin-bottom: .42rem; }
  .welcome-brand svg { width: 20px; height: 20px; }
  .welcome-tag { margin-bottom: .32rem; font-size: .68rem; }
  #welcome-title { font-size: clamp(1.65rem,7vw,2.5rem); line-height: 1.12; }
  .welcome-copy { margin: .4rem 0 .6rem; font-size: .82rem; line-height: 1.45; }
  .welcome-caption { display: none; }
  #entry { padding-top: .5rem; }
  #entry .entry-fields { margin-bottom: .45rem; }
}

/* Welcome: one full-screen composition, with a distinct species choice. */
#welcome { align-items: center; padding: max(2rem,env(safe-area-inset-top)) max(1.5rem,env(safe-area-inset-right)) max(2rem,env(safe-area-inset-bottom)) max(1.5rem,env(safe-area-inset-left)); background: linear-gradient(160deg,#392b57c7,#514064b8 50%,#302443ed); }
.welcome-content { width: min(100%,64rem); min-height: calc(100dvh - 4rem); display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); grid-template-rows: auto 1fr; column-gap: clamp(2rem,7vw,7rem); row-gap: 2rem; align-items: center; }
.welcome-brand { grid-column: 1 / -1; margin: 0; }
.welcome-story { min-width: 0; }
#welcome-title { font-size: clamp(2.5rem,4.7vw,4rem); }
.welcome-copy { margin-bottom: 0; }
#entry { width: 100%; padding: 0; border: 0; }
.pet-kind-options { min-width: 0; padding: 0; margin: 0 0 1.5rem; border: 0; }
.pet-kind-options legend { margin-bottom: .8rem; font-size: .9rem; font-weight: 650; color: #fff3e5; }
.pet-kind-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; }
#entry .pet-kind-card { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; min-height: 172px; padding: .85rem .3rem; border: 1px solid #f7e6f354; border-radius: 1.2rem; background: #f6eafa12; color: #fff7ee; cursor: pointer; transition: background .18s,border-color .18s; }
.pet-kind-card input { position: absolute; width: 1px; height: 1px; min-height: 0; opacity: 0; }
#entry .pet-kind-card:has(input:checked) { border: 2px solid #f6dcb4; background: #f6debd24; }
.pet-kind-card:has(input:checked)::after { content: '✓'; position: absolute; top: .55rem; right: .65rem; color: #f6dcb4; font-size: .88rem; }
.pet-kind-card:has(input:focus-visible) { outline: 3px solid #fff5d8; outline-offset: 4px; }
.pet-kind-card svg { width: 76px; height: 76px; fill: none; stroke: #665060; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pet-kind-card .pet-face { fill: #eed7b4; }
.pet-kind-card .pet-ear { fill: #b5886d; }
.pet-kind-card .pet-muzzle { fill: #fff1d9; stroke: none; }
.pet-kind-card:has([value="cat"]) .pet-face { fill: #e2d6ea; }
.pet-kind-card:has([value="cat"]) .pet-ear { fill: #d5adc6; stroke: none; }
.pet-kind-card span { font-size: 1rem; font-weight: 700; }
.pet-kind-card small { color: #ead9eb; font-size: .67rem; text-align: center; }
#entry .entry-fields { grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); gap: .65rem; margin-bottom: 1rem; }
#entry :is(input:not([type="radio"]),select) { min-height: 50px; border-radius: .75rem; }
#enter { min-height: 54px; border-radius: .85rem; }
.welcome-caption { text-align: center; margin: .85rem 0 0; }
#entry-status { grid-column: 1 / -1; }
@media (max-width: 42rem) {
  #welcome { padding: max(1.5rem,env(safe-area-inset-top)) max(1.35rem,env(safe-area-inset-right)) max(1.5rem,env(safe-area-inset-bottom)) max(1.35rem,env(safe-area-inset-left)); }
  .welcome-content { width: min(100%,29rem); min-height: calc(100dvh - 3rem); display: flex; flex-direction: column; align-items: stretch; justify-content: space-between; gap: 1.5rem; }
  .welcome-brand { margin: 0; }
  .welcome-tag { font-size: .7rem; margin-bottom: .6rem; }
  #welcome-title { font-size: clamp(2.2rem,10vw,3rem); }
  .welcome-copy { font-size: .9rem; line-height: 1.7; margin: .7rem 0 0; }
  .pet-kind-options { margin-bottom: 1.15rem; }
  #entry .pet-kind-card { min-height: 142px; }
  .pet-kind-card svg { width: 64px; height: 64px; }
}
@media (max-height: 640px) and (max-width: 42rem) {
  #welcome { padding-block: max(1rem,env(safe-area-inset-top)) max(1rem,env(safe-area-inset-bottom)); }
  .welcome-content { min-height: calc(100dvh - 2rem); gap: .8rem; }
  .welcome-tag { display: none; }
  #welcome-title { font-size: 2rem; }
  .welcome-copy { margin-top: .4rem; font-size: .8rem; }
  #entry .pet-kind-card { min-height: 106px; padding: .45rem .2rem; }
  .pet-kind-card svg { width: 48px; height: 48px; }
  .pet-kind-options { margin-bottom: .75rem; }
  .pet-kind-options legend { margin-bottom: .5rem; }
  .pet-kind-card small { font-size: .6rem; }
  #entry .entry-fields { margin-bottom: .65rem; }
  .welcome-caption { margin-top: .55rem; }
}
@media (max-height: 460px) {
  #welcome { padding-block: .65rem; }
  .welcome-content { min-height: calc(100dvh - 1.3rem); gap: .5rem; }
  .welcome-brand { font-size: .8rem; }
  .welcome-story .welcome-copy, .welcome-tag, .welcome-caption { display: none; }
  #welcome-title { font-size: 1.6rem; line-height: 1.15; }
  #welcome-title br { display: none; }
  .pet-kind-options { margin-bottom: .4rem; }
  .pet-kind-options legend { font-size: .75rem; margin-bottom: .3rem; }
  #entry .pet-kind-card { min-height: 62px; flex-direction: row; padding: .25rem; }
  .pet-kind-card svg { width: 38px; height: 38px; }
  .pet-kind-card small { display: none; }
  #entry .entry-fields { margin-bottom: .4rem; }
  #entry :is(input:not([type="radio"]),select), #enter { min-height: 44px; }
}

/* Finding an individual companion: a focused three-step form. */
textarea { width: 100%; padding: .6rem; border: 1px solid #b9a8be; border-radius: .65rem; font: inherit; font-size: 16px; color: inherit; background: #fffdfa; resize: vertical; }
#call-intro { border-color: #e4d5e8; border-radius: 1.35rem; background: #fffaf4; }
.call-kicker { display: flex; justify-content: space-between; }
.reunion-photo { min-width: 0; padding: .8rem; background: #f2e9f4; border: 1px solid #e2d2e7; border-radius: 1rem; }
.reunion-photo label { display: block; font-weight: 700; }
.reunion-photo label span { display: inline; color: #7a6383; font-size: .7rem; font-weight: 500; }
.reunion-photo p, .call-help { margin: .4rem 0 .6rem; color: #736274; font-size: .78rem; line-height: 1.6; }
.reunion-photo img { display: block; width: 100%; height: 112px; object-fit: contain; border-radius: .6rem; margin-bottom: .5rem; background: #fffbf7; }
.reunion-photo input { background: #fffaf5; min-width: 0; font-size: .75rem; }
.photo-extra { margin-top: .8rem; }
.reunion-photo .photo-file-alternative { position: relative; display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: .6rem; padding: .6rem; border: 1px solid #cbb6d7; border-radius: .65rem; background: #fffaf2; color: #594265; font-size: 16px; font-weight: 600; line-height: 1.5; text-align: center; overflow-wrap: anywhere; cursor: pointer; }
.reunion-photo .photo-file-alternative input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 44px; margin: 0; padding: 0; opacity: 0; font-size: 16px; cursor: pointer; }
.reunion-photo .photo-file-alternative:focus-within { outline: 3px solid #745633; outline-offset: 3px; }
.reunion-summary { padding: 1rem; border-radius: 1rem; background: #f1e9f4; line-height: 1.7; color: #5c4769; white-space: pre-wrap; overflow-wrap: anywhere; }
.reunion-consent { display: flex; align-items: center; gap: .55rem; min-height: 48px; font-size: .85rem; line-height: 1.5; }
.reunion-consent input { width: 22px; height: 22px; min-height: 0; flex: none; accent-color: #86679b; }
.reunion-development { margin: .5rem 0; padding: .7rem; border-radius: .7rem; background: #f6eee2; font-size: .78rem; line-height: 1.6; }
.reunion-development summary { cursor: pointer; min-height: 32px; }
.reunion-development p { margin: .3rem 0; }
#call-error { background: #fff0eb; color: #8b3d43; border-radius: .6rem; padding: .7rem; font-size: .84rem; line-height: 1.5; }
#call-note { color: #796482; }
.call-actions #call-next { flex: 1; background: #e8daf4; color: #453353; border-color: #d6c2e9; font-weight: 700; }
#call-submit { word-break: keep-all; overflow-wrap: anywhere; }
.reunion-sent-mark { text-align: center; padding: .5rem; color: #9a78ad; font-size: 2.5rem; }
#call-request-status h3 { font-size: 1.08rem; margin: .5rem 0; }
#call-request-status > p { font-size: .85rem; line-height: 1.6; }
#call-request-status button { margin-top: .7rem; background: #f0e6f6; border-color: #dac9e4; font-size: .85rem; }
#restore-home-key { display: block; margin: .2rem auto 0; padding: .25rem .6rem; border: 0; background: transparent; color: #f5e6d7; font-size: .75rem; text-decoration: underline; text-underline-offset: .2em; }
@media (max-width: 36rem) { #call-form .photo-fields { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .5rem; } .reunion-photo { padding: .55rem; } .reunion-photo input { padding: .25rem; } .reunion-photo img { height: 90px; } }

.npc-name-tag { position: fixed; z-index: 1; transform: translate(-50%,-100%); pointer-events: none; padding: .2rem .46rem; border-radius: 1rem; border: 1px solid #fff6e8a8; background: #fff0daf0; color: #675167; font-size: .63rem; font-weight: 650; white-space: nowrap; box-shadow: 0 2px 8px #59456815; }

#home-camera-tools { position: fixed; z-index: 1; right: max(.75rem,env(safe-area-inset-right)); top: 42%; display: flex; flex-direction: column; gap: .35rem; padding: .3rem; border: 1px solid #fff7eac9; border-radius: 1rem; background: #f7efdfdc; backdrop-filter: blur(6px); }
#home-camera-tools button { width: 44px; min-height: 44px; padding: .25rem; border: 0; border-radius: .7rem; background: transparent; color: #665075; font-size: .67rem; font-weight: 650; line-height: 1.3; }
#home-camera-tools #home-zoom-in, #home-camera-tools #home-zoom-out { font-size: 1.35rem; }
#home-camera-tools button:hover, #home-camera-tools button[aria-pressed="true"] { background: #e4d7ec; }
@media (max-height: 460px) { #home-camera-tools { top: 28%; flex-direction: row; } }
.entry-lock { margin: .65rem 0; }
.entry-lock > label { display:block; color:#f9f1e8; font-size:.8rem; margin-bottom:.35rem; }
.entry-lock > input { width:100%; font-size:16px; letter-spacing:.3em; }
#entry-pin::placeholder { letter-spacing: normal; color: #75677b; opacity: 1; }
.entry-lock p { color:#f3e7e7; font-size:.7rem; line-height:1.5; margin:.35rem 0; overflow-wrap:anywhere; }
.entry-lock details { color:#f8eaf0; font-size:.73rem; margin:.4rem 0; }
.entry-lock details summary { min-height:32px; cursor:pointer; }
.entry-lock details input { width:100%; font-size:16px; margin:.3rem 0; }
#entry-new-house { display: block; width: 100%; min-height: 44px; margin: .65rem 0 .85rem; padding: .6rem .75rem; border-color: #d8c5e3; background: #fffaf2; color: #513c60; font-size: 16px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
#entry-house-options > label[for="entry-household-number"], #entry-house-choice > label { display: block; margin: .5rem 0 .3rem; line-height: 1.5; }
#household-key-restore { border:0; background:transparent; color:inherit; font:inherit; text-decoration:underline; padding:.35rem; }
.world-label #household-info { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .12rem; min-width: 44px; min-height: 44px; padding: .25rem; border: 1px solid #ddcfe5; border-radius: .75rem; color: #655175; background: #eee4f4; font-size: .6rem; line-height: 1.25; white-space: nowrap; pointer-events: auto; }
.world-label #household-info svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.world-label #household-info:hover { background: #e3d5ed; }
.world-label #household-info:focus-visible, .world-label #location:focus-visible { outline: 3px solid #745633; outline-offset: 3px; }
#household-card { position:fixed; z-index:30; left:50%; top:50%; transform:translate(-50%,-50%); width:min(90vw,390px); max-height:85dvh; overflow:auto; padding:1.3rem; border-radius:1.4rem; background:#fff9ef; color:#5b4863; box-shadow:0 0 0 100vmax #342d4666; }
#household-card h2 { font-size:1.15rem; }
#household-card p { font-size:.85rem; line-height:1.7; }
#household-number { display:block; overflow-wrap:anywhere; font-family:monospace; background:#eee5f4; border-radius:.6rem; padding:.7rem; user-select:all; font-size:1rem; }
#household-card button { width:100%; margin-top:.5rem; }
#music-toggle { position:fixed; top:max(.7rem,env(safe-area-inset-top)); right:max(.7rem,env(safe-area-inset-right)); z-index:4; min-width:44px; min-height:44px; padding:.45rem .65rem; font-size:.7rem; color:#665073; background:#fff7e8e8; border:1px solid #ffffffa0; border-radius:1rem; }
.world-notices { top:calc(3.8rem + env(safe-area-inset-top)); }
#household-card details { margin-top:1rem; font-size:.8rem; line-height:1.7; }
#household-card summary { cursor:pointer; min-height:44px; }
#household-card label { display:block; margin:.4rem 0; }
#household-card input { width:100%; font-size:16px; }
.trial-note { padding:.7rem; background:#fff4dfeb; color:#654d71; border-radius:.7rem; font-size:.76rem; line-height:1.6; }
.entry-recovery { color:#f5e9ef; font-size:.76rem; line-height:1.6; margin:.6rem 0; }
.entry-recovery summary { cursor:pointer; min-height:36px; }
.entry-recovery input { width:100%; font-size:16px; margin:.35rem 0; }
.entry-recovery button { min-height:44px; width:100%; margin:.2rem 0; }
.entry-address-help > summary { min-height: 44px; padding-block: .5rem; }
.entry-address-help p { margin: .5rem 0; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.entry-address-help a { display: block; min-height: 44px; padding: .6rem .7rem; border: 1px solid #d8c5e3; border-radius: .65rem; background: #fffaf2; color: #513c60; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; text-underline-offset: .2em; }
.entry-address-help a span { font-size: 13px; }
.entry-address-help :is(a,summary):focus-visible { outline: 3px solid #fff5d8; outline-offset: 3px; }
#entry .entry-help { margin-top: 1rem; border-top: 1px solid #efd9ec56; }
#entry .entry-help summary { min-height: 44px; padding-block: .65rem; line-height: 1.5; cursor: pointer; }
#entry .entry-help > summary { font-size: 14px; }
#entry .entry-help p { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
#entry .entry-help label { display: block; margin-top: .5rem; }
#entry .entry-help input, #entry .entry-help select { font-size: 16px; }
#entry .entry-help summary:focus-visible { outline: 3px solid #fff5d8; outline-offset: 2px; }
#entry .entry-help :is(input,select,button):focus-visible { outline: 3px solid #f5dba8; outline-offset: 3px; }
#welcome .welcome-tag { display: none; }
@media (max-width: 42rem) {
  #welcome .welcome-content { justify-content: flex-start; gap: 1rem; }
  #entry .pet-kind-card { min-height: 76px; flex-direction: row; gap: .5rem; }
  #entry .pet-kind-card svg { width: 44px; height: 44px; }
  #entry .pet-kind-card small { display: none; }
  #entry .pet-kind-options { margin-bottom: .8rem; }
}
.trial-links { display:flex; gap:.4rem; margin:.6rem 0; }
.trial-links button { flex:1; min-height:44px; padding:.35rem; font-size:.67rem; background:#f4e8fa; color:#604c70; }
#household-card-code { display:block; padding:.7rem; background:#f2e7f8; overflow-wrap:anywhere; user-select:all; }

/* Photo library: one multi-select entry, with optional per-angle controls. */
#call-form .photo-picker-control { position: relative; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: .65rem; border: 1px solid #cbb6d7; border-radius: .8rem; background: #fffaf2; color: #594265; font-size: 16px; line-height: 1.5; font-weight: 600; text-align: center; overflow-wrap: anywhere; cursor: pointer; }
#call-form .photo-picker-control input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 44px; margin: 0; padding: 0; opacity: 0; font-size: 16px; cursor: pointer; }
#call-form .photo-picker-control:focus-within { outline: 3px solid #745633; outline-offset: 3px; }
#call-form .photo-library-picker { min-height: 64px; background: #e8daf0; border-color: #c9b2d8; }
.photo-library-alternative, .photo-library-legacy { margin: .65rem 0; border-top: 1px solid #e4d6e8; }
.photo-library-alternative > summary, .photo-library-legacy > summary { min-height: 44px; padding: .65rem .15rem; font-size: 16px; line-height: 1.5; cursor: pointer; overflow-wrap: anywhere; }
.photo-library-alternative > summary:focus-visible, .photo-library-legacy > summary:focus-visible { outline: 3px solid #745633; outline-offset: 2px; }
#photo-library-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .5rem; }
.photo-library-card { min-width: 0; padding: .5rem; border: 1px solid #dfcfe7; border-radius: .85rem; background: #f3eaf6; overflow-wrap: anywhere; }
.photo-library-image { display: block; width: 100%; height: 112px; object-fit: contain; border-radius: .55rem; background: #fffaf3; }
#call-form .photo-library-role { display: block; width: 100%; min-width: 0; min-height: 44px; margin-top: .5rem; font-size: 16px; }
#call-form .photo-library-remove { display: block; width: 100%; min-height: 44px; margin-top: .4rem; padding: .4rem; font-size: 16px; color: #68415e; background: #fffaf3; white-space: normal; }
.photo-library-card :is(button,select):focus-visible { outline: 3px solid #745633; outline-offset: 2px; }
.photo-source-options { display: grid; grid-template-columns: minmax(0,1fr); gap: .6rem; }
#call-form .photo-source-options .photo-picker-control { flex-direction: column; min-height: 64px; gap: .2rem; }
.photo-source-options .photo-picker-control span { font-size: 13px; font-weight: 400; }
.photo-source-options .photo-picker-control:has(input:disabled) { opacity: .6; cursor: wait; }
#call-step-photos .call-help, #call-step-confirm .call-help { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
#call-form #call-step-confirm .reunion-consent { min-height: 48px; padding-block: .4rem; font-size: 16px; line-height: 1.5; cursor: pointer; }
#call-step-confirm .reunion-consent:focus-within { outline: 3px solid #745633; outline-offset: 2px; border-radius: .4rem; }
#call-form .call-actions { flex-shrink: 0; }
#call-form .call-scroll { scroll-padding-block: .5rem; }
@media (max-width: 360px) {
  #call-form .photo-library-legacy .photo-fields { grid-template-columns: minmax(0,1fr); }
}
#photo-library-count, #photo-library-help { font-size: .85rem; line-height: 1.5; overflow-wrap: anywhere; }
#photo-library-count:empty, #photo-library-help:empty { display: none; }
body:has(#call-intro:not([hidden])) #music-toggle { z-index: 1; }

/* A dedicated home-and-paw destination; the full name remains accessible. */
.dock-layout #home { align-self: stretch; flex: 0 0 56px; width: 56px; min-width: 56px; min-height: 56px; padding: 7px; gap: 0; border: 1px solid #d9bbad; border-radius: 1rem; background: linear-gradient(145deg,#fff2d5,#f2dcd5); color: #70506c; box-shadow: inset 0 1px 0 #fffaf2,0 2px 5px #60435b18; }
.dock-layout #home .home-destination-icon { width: 40px; height: 40px; stroke-width: 1.8; }
.home-destination-icon .home-icon-wall { fill: #fff9ea; stroke: #805d75; }
.home-destination-icon .home-icon-roof { fill: none; stroke: #92657d; stroke-width: 2.6; }
.home-destination-icon .home-icon-door { fill: #ead8e8; stroke: #805d75; }
.home-destination-icon .home-icon-paw { fill: #92657d; stroke: none; }
.dock-layout #home:hover { background: #f6dfc8; border-color: #a77b91; }
.dock-layout #home:active { background: #ead0c9; }
.dock-layout #home:focus-visible { outline: 3px solid #745633; outline-offset: 3px; }
.dock-layout #home { flex-direction: column; gap: 2px; padding: 5px; }
.dock-layout #home .home-destination-icon { width: 32px; height: 32px; }
.dock-layout #home .home-action-label { display: block; max-width: 100%; font-size: 11px; font-weight: 650; line-height: 1.3; white-space: nowrap; color: #65455f; }

/* Optional photo flow. Host enables it only when capture is available. */
#guardian-more { align-self: flex-end; min-width: 44px; min-height: 44px; padding: .45rem .75rem; font-size: 16px; color: #594265; background: #fff7e9f2; border-color: #dbc8e3; border-radius: 1rem; }
#guardian-more > span { font-weight: 800; }
#guardian-more { flex: 0 0 auto; margin-bottom: .1rem; }
.guardian-menu-session { margin-top: 14px; padding-top: 10px; border-top: 1px solid #dfd2e3; }
#guardian-menu #guardian-logout { min-height: 44px; font-size: 16px; background: transparent; border-color: transparent; color: #6d5b73; }
#guardian-menu #guardian-logout:hover:not(:disabled) { background: #f0e7f2; }
#guardian-menu #guardian-logout:focus-visible { outline: 3px solid #745633; outline-offset: 2px; }
.guardian-photo-panel, #portrait-panel { position: fixed; z-index: 25; left: max(12px,env(safe-area-inset-left)); right: max(12px,env(safe-area-inset-right)); bottom: calc(12px + env(safe-area-inset-bottom)); width: auto; max-width: 420px; margin-inline: auto; max-height: calc(var(--visible-viewport-height) - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow: auto; overscroll-behavior: contain; padding: 16px; border: 1px solid #dfcfe7; border-radius: 20px; background: #fff9eef5; color: #51415f; box-shadow: 0 8px 32px #34294440; font-size: 16px; }
.guardian-photo-panel h2, #portrait-panel h2 { margin: 0 0 12px; font-size: 20px; line-height: 1.4; overflow-wrap: anywhere; }
.guardian-photo-panel button { display: block; width: 100%; margin-top: 8px; }
.guardian-photo-panel button, #portrait-panel button { min-width: 44px; min-height: 44px; font-size: 16px; white-space: normal; }
#portrait-open, #portrait-capture, #portrait-save { background: #eadcf2; color: #594265; border-color: #cbb6d7; }
.portrait-panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.portrait-panel-heading h2 { flex: 1; }
#portrait-close { flex: none; }
#portrait-compose-help, .portrait-panel-help, #portrait-status { margin: 10px 0; line-height: 1.5; overflow-wrap: anywhere; }
#portrait-panel :is(#portrait-compose,#portrait-preview-area) { display: none; }
#portrait-panel:is([data-phase="framing"],[data-phase="capturing"]) #portrait-compose { display: block; }
#portrait-panel:is([data-phase="preview"],[data-phase="saving"]) #portrait-preview-area { display: block; }
#portrait-panel:is([data-phase="capturing"],[data-phase="saving"]) { cursor: progress; }
#portrait-panel :is(button,input):focus-visible { outline: 3px solid #745633; outline-offset: 2px; }
#portrait-capture { width: 100%; }
#portrait-preview { display: block; width: 100%; max-height: min(45dvh,360px); object-fit: contain; margin: 12px 0; border-radius: 12px; background: #ece4ee; }
.portrait-panel-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.portrait-panel-actions button { flex: 1 1 110px; }
#portrait-status:empty { display: none; }
body:has(#guardian-menu:not([hidden]),#portrait-panel:not([hidden])) :is(.world-dock,#move-control,#home-camera-tools,.world-notices,#self-tag,.npc-name-tag) { visibility: hidden; }
body:has(#portrait-panel:not([hidden])) :is(.world-label,#music-toggle) { visibility: hidden; }

/* Compact scene header; music remains independent on the entry screen. */
.world-label { top: max(12px,env(safe-area-inset-top)); left: max(12px,env(safe-area-inset-left)); display: block; max-width: min(47vw,calc(100vw - max(12px,env(safe-area-inset-left)) - max(12px,env(safe-area-inset-right)) - 140px)); padding: 6px 9px; border-radius: 12px; box-shadow: 0 2px 8px #51405f10; background: #fff8ede8; }
.world-label h2 { font-size: 14px; line-height: 1.3; }
.world-label #guardian-name { font-size: 11px; margin-top: 2px; }
.world-label #district { font-size: 11px; }
body:has(#world:not([hidden])) #music-toggle { top: max(12px,env(safe-area-inset-top)); right: calc(max(12px,env(safe-area-inset-right)) + 56px); width: 72px; height: 48px; padding: 4px; font-size: 12px; border-radius: 12px; }
#world #guardian-more { position: fixed; z-index: 4; top: max(12px,env(safe-area-inset-top)); right: max(12px,env(safe-area-inset-right)); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; width: 48px; height: 48px; min-width: 48px; padding: 3px; margin: 0; border-radius: 12px; font-size: 11px; line-height: 1.2; }
#guardian-more svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#guardian-more:focus-visible { outline: 3px solid #745633; outline-offset: 3px; }
.world-notices { top: calc(max(12px,env(safe-area-inset-top)) + 56px); }
.settings-brand { margin: 0 0 4px; color: #78677d; font-size: 12px; }
#pet-info-panel fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
#pet-info-panel label { display: flex; align-items: center; gap: 8px; min-height: 48px; margin-top: 8px; padding: 8px; border: 1px solid #d9c8e2; border-radius: 10px; font-size: 16px; }
#pet-info-panel input[type="radio"] { flex: none; width: 20px; height: 20px; min-height: 0; margin: 0; accent-color: #795d8b; }
#pet-info-panel legend { max-width: 100%; font-size: 16px; overflow-wrap: anywhere; }
#pet-info-panel label { overflow-wrap: anywhere; }
#pet-info-panel label:focus-within { outline: 3px solid #745633; outline-offset: 2px; }
#pet-info-panel p { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
#pet-info-status:empty { display: none; }
#pet-info-panel { display: flex; flex-direction: column; overflow: hidden; top: calc(var(--visible-viewport-top) + 12px + env(safe-area-inset-top)); bottom: auto; }
#pet-info-form { display: flex; flex-direction: column; min-height: 0; }
.pet-info-scroll { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 4px; scroll-padding-block: 8px; }
#pet-info-panel label.pet-info-field { display: block; padding: 0; border: 0; margin-block: 12px; }
#pet-info-panel .pet-info-field :is(input,select,textarea) { display: block; margin-top: 6px; width: 100%; min-width: 0; font-size: 16px; }
#pet-info-panel .pet-info-field :is(input,select) { min-height: 44px; }
.pet-info-actions { display: flex; flex-wrap: wrap; gap: 8px; flex-shrink: 0; padding-top: 8px; border-top: 1px solid #dfd2e3; }
#pet-info-panel .pet-info-actions button { flex: 1 1 100px; margin: 0; }
#pet-info-photos { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
#pet-info-photos img { width: 100%; max-height: 100px; object-fit: contain; }
#pet-info-error { color: #8b3d43; background: #fff0eb; padding: 8px; border-radius: 8px; }
body:has(#pet-info-panel:not([hidden])) :is(.world-dock,#move-control,#home-camera-tools,.world-notices,#guardian-more,#world-controls-help) { visibility: hidden; }
#guardian-menu #household-info { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; font-size: 16px; color: #594265; background: #f0e6f4; border-color: #d9c8e2; }
#guardian-menu #household-info svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
#world-controls-help { position: fixed; z-index: 3; left: max(12px,env(safe-area-inset-left)); right: max(12px,env(safe-area-inset-right)); bottom: calc(10.5rem + env(safe-area-inset-bottom)); width: auto; max-width: 380px; margin-inline: auto; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: #fff8edf0; color: #594265; box-shadow: 0 2px 10px #51405f20; }
#world-controls-help p { min-width: 0; margin: 0; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
#world-controls-help-close { flex: none; min-width: 44px; min-height: 44px; font-size: 14px; }
body:has(#guardian-menu:not([hidden]),#portrait-panel:not([hidden]),#call-intro:not([hidden]),#household-card:not([hidden])) #world-controls-help { visibility: hidden; }
@media (max-height: 460px) { #world-controls-help { bottom: calc(5.5rem + env(safe-area-inset-bottom)); max-width: 300px; } }
body:has(#guardian-menu:not([hidden]),#portrait-panel:not([hidden]),#call-intro:not([hidden]),#household-card:not([hidden])) #guardian-more { visibility: hidden; }

/* Keep home travel outside the shared care surface. */
.dock-layout { display: flex; align-items: center; justify-content: center; gap: 16px; max-width: 100%; min-width: 0; pointer-events: none; }
.dock-layout .main-dock { min-width: 0; }
.dock-layout #home { display: flex; align-items: center; justify-content: center; flex: 0 0 80px; width: 80px; min-width: 80px; min-height: 72px; border: 2px solid #c59c7d; background: linear-gradient(145deg,#fff1ce,#f3d9b7); box-shadow: 0 3px 12px #61435626,inset 0 1px 0 #fffaf2; }
.dock-layout #home .home-action-label { font-size: 14px; font-weight: 700; }
.dock-layout #home .home-destination-icon { flex: none; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.dock-layout > :is(.main-dock,#home) { pointer-events: auto; }
.dock-layout:has(> #home:not([hidden])) > .main-dock { flex: 0 0 188px; width: 188px; min-height: 64px; padding: 4px; gap: 2px; }
.dock-layout:has(> #home:not([hidden])) .main-dock > :is(#wave,#sit,#snack) { flex: 1 1 0; min-width: 44px; min-height: 54px; flex-direction: column; gap: 4px; padding: 4px 2px; font-size: 12px; }
.dock-layout:has(> #home:not([hidden])) .main-dock > :is(#wave,#sit,#snack) span { max-width: 100%; white-space: normal; overflow: visible; text-overflow: clip; }
.world-dock:has(#cancel:not([hidden])) .home-travel,
.world-dock:has(.main-dock > #call-pet[aria-expanded="true"]) .home-travel,
.world-dock:has(#rest-dock:not([hidden])) .home-travel { display: none; }
@media (max-width: 42rem) {
  .world-dock { max-width: calc(100% - max(12px,env(safe-area-inset-left)) - max(12px,env(safe-area-inset-right))); }
  #move-control { bottom: calc(.65rem + env(safe-area-inset-bottom) + var(--world-dock-height,72px) + 16px); }
  .dock-layout { flex-wrap: wrap; }
}
