/* A calm, illustrated expedition page; the map and its controls share one card. */
body[data-platform="island"] { position: static; inset: auto; height: auto; min-height: 100dvh; overflow-x: hidden; overflow-y: auto; background: #f8f8f1; color: #304f4b; user-select: auto; --voyage-line: #ccd3bf; --voyage-paper: #fffdf5; }
body[data-platform="island"] .game-topbar { position: relative; inset: auto; width: min(1400px, 100%); margin: auto; padding: 20px 32px; min-height: 88px; background: transparent; border: 0; box-shadow: none; gap: 20px; }
body[data-platform="island"] .brand-info h1 { font-size: 1.12rem; max-width: none; letter-spacing: .02em; }
body[data-platform="island"] .brand-info p { display: block; margin-top: 4px; color: #6f8074; font-size: .76rem; }
body[data-platform="island"] .brand-logo { width: 44px; height: 44px; background: #e8eee0; border: 1px solid var(--voyage-line); border-radius: 13px; }
body[data-platform="island"] .adventure-action.c-game-btn { min-height: 42px; border: 1px solid var(--voyage-line); border-radius: 8px; background: #fffdf5; color: #3c625b; box-shadow: none; padding: 8px 11px; }
body[data-platform="island"] .adventure-button-icon { font-size: 1rem; }
body[data-platform="island"] .game-settings > summary { background: transparent; border-color: var(--voyage-line); box-shadow: none; }
body[data-platform="island"] .site-language-switch select { background: #fffdf5; border-color: var(--voyage-line); font-size: .8rem; }
.voyage-page { width: min(1320px, calc(100% - 64px)); margin: 0 auto 64px; }
.voyage-intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 0 30px; }
.voyage-kicker { color: #6d8378; font-size: .72rem; font-weight: 700; letter-spacing: .16em; margin: 0 0 9px; }
.voyage-intro h2 { color: #294d49; font-size: clamp(1.8rem, 3.2vw, 2.65rem); font-weight: 800; letter-spacing: .025em; line-height: 1.4; }
.voyage-intro p:not(.voyage-kicker) { color: #687c6e; line-height: 1.8; margin-top: 10px; font-size: .98rem; }
.voyage-directory-link { flex-shrink: 0; color: #496e60; text-decoration: none; padding: 12px 0; border-bottom: 1px solid #9ead95; font-weight: 700; }
.voyage-directory-link span { margin-left: 16px; }
.voyage-card { background: var(--voyage-paper); border: 1px solid #bdcbb9; border-radius: 20px; overflow: clip; box-shadow: 0 12px 32px #3f5d4810; }
.voyage-welcome { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #faf0d3; padding: 24px 28px; border-bottom: 1px solid #d6cda9; }
.voyage-welcome h2 { font-size: 1.35rem; line-height: 1.6; color: #38574c; }
.voyage-welcome p:last-child { margin-top: 7px; font-size: .9rem; color: #637568; line-height: 1.7; }
.voyage-seal { display: grid; place-items: center; width: 58px; height: 58px; flex-shrink: 0; border: 1px solid #d0c3a1; border-radius: 50%; font-size: 1.9rem; background: #fffae9; color: #748c78; }
.voyage-traveler { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding: 13px 24px; background: #f2f3e7; border-bottom: 1px solid #c4d1c1; }
body[data-platform="island"] .visitor-strip { position: static; inset: auto; min-height: 38px; flex: 1; padding: 0; border: 0; background: none; font-size: .83rem; gap: 9px; z-index: auto; }
body[data-platform="island"] .visitor-strip button { min-height: 38px; background: #fffdf5; border: 1px solid var(--voyage-line); border-radius: 7px; }
body[data-platform="island"] .rpg-hud-bar { position: static; inset: auto; max-width: none; padding: 0; background: none; border: 0; box-shadow: none; gap: 9px; }
body[data-platform="island"] .hud-stat-pill { border: 1px solid #d6d4b8; box-shadow: none; background: #fffcf0; border-radius: 7px; font-size: .8rem; }
body[data-platform="island"] .hud-hero-badge { border: 0; background: transparent; padding: 0; }
body[data-platform="island"] .hud-lv-badge { background: transparent; color: #5e756b; font-size: .7rem; border: 0; }
body[data-platform="island"] .hud-name-row > .hud-name { display: none; }
body[data-platform="island"] .hud-exp-track { width: 100%; max-width: 110px; height: 4px; background: #dce3d3; }
.voyage-map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; }
.voyage-map { position: relative; height: clamp(540px, 68vh, 700px); min-width: 0; overflow: hidden; background: #c0d8d1; }
body[data-platform="island"] #stage { position: absolute; inset: 0; width: 100%; height: 100%; background: #c0d8d1; }
body[data-platform="island"] #map2DView { position: absolute; inset: 0; padding: 20px; width: 100%; height: 100%; overflow-y: auto; background: #edf1e4; z-index: 25; }
body[data-platform="island"] .explorer-console { position: static; inset: auto; width: auto; height: auto; min-width: 0; border: 0; border-left: 1px solid #becdbb; background: #f4f4e9; z-index: 2; }
body[data-platform="island"] .explorer-console-body { position: static; height: clamp(540px, 68vh, 700px); max-height: none; width: 100%; padding: 18px 16px; overflow: auto; border: 0; border-radius: 0; box-shadow: none; background: none; }
body[data-platform="island"] .explorer-console h2 { font-size: .82rem; margin-bottom: 12px; }
body[data-platform="island"] .explorer-console button { min-height: 42px; border: 1px solid #bec9b4; border-radius: 8px; background: #fffdf6; color: #3c6259; font-size: .8rem; box-shadow: none; }
body[data-platform="island"] .explorer-console button[aria-pressed="true"], body[data-platform="island"] .explorer-overview { color: #fffdf0; background: #4a6e67; border-color: #4a6e67; }
body[data-platform="island"] .explorer-console > summary { display: none; }
body[data-platform="island"] .island-3d-label { border-radius: 999px; padding: 8px 11px; min-height: 36px; border: 1px solid #d3d8bf; background: #fffdf0; color: #35574e; font-size: .77rem; box-shadow: 0 3px 8px #31574b18; }
body[data-platform="island"] .island-3d-label.center { background: #fbebbb; border-color: #c5b785; color: #665332; }
body[data-platform="island"] .view-hints { position: absolute; inset: auto 18px 16px 18px; width: fit-content; max-width: calc(100% - 36px); padding: 7px 13px; background: #fbfbedde; border: 1px solid #c9d5bf; border-radius: 20px; font-size: .72rem; box-shadow: none; z-index: 24; }
body[data-platform="island"] .virtual-dpad { position: relative; inset: auto; margin: 10px auto; }
.voyage-directory { margin-top: 42px; }
.voyage-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.voyage-section-heading h2 { color: #31544b; font-size: 1.5rem; line-height: 1.6; }
.voyage-section-heading > p { font-size: .85rem; color: #71806f; line-height: 1.7; }
.voyage-island-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.voyage-island-card { display: flex; align-items: start; gap: 13px; min-height: 142px; padding: 22px 18px; background: #fffdf5; color: #35594e; border: 1px solid #cbd4bd; border-radius: 13px; cursor: pointer; font: inherit; text-align: left; transition: border-color .18s, background .18s; }
.voyage-island-card:hover { background: #f0f3e7; border-color: #819e85; }
.voyage-card-icon { display: grid; place-items: center; width: 39px; height: 39px; flex-shrink: 0; border-radius: 11px; font-size: 1.35rem; background: #eee6d5; }
.voyage-island-card:nth-child(2) .voyage-card-icon { background: #e1ece8; }
.voyage-island-card:nth-child(3) .voyage-card-icon { background: #e7edd7; }
.voyage-island-card:nth-child(4) .voyage-card-icon { background: #ebe6ee; }
.voyage-island-card:nth-child(5) .voyage-card-icon { background: #e1eeee; }
.voyage-card-copy { display: grid; gap: 8px; }
.voyage-card-copy small { font-size: .65rem; letter-spacing: .14em; color: #84927c; }
.voyage-card-copy strong { font-size: 1.03rem; }
.voyage-card-copy > span { font-size: .8rem; line-height: 1.75; color: #6c7f71; }
.voyage-card-arrow { margin-left: auto; font-size: 1.1rem; color: #81967b; }
body[data-platform="island"]:is(.theme-night) { --voyage-paper: #273e3e; --voyage-line: #668078; background: #203434; color: #eff2df; }
body[data-platform="island"].theme-night :is(.voyage-welcome,.voyage-traveler,.explorer-console,.voyage-island-card) { background: #304a46; border-color: #668078; color: #eff2df; }
body[data-platform="island"].theme-night :is(.voyage-intro h2,.voyage-intro p,.voyage-welcome h2,.voyage-welcome p,.voyage-section-heading h2,.voyage-section-heading > p,.voyage-card-copy span,.voyage-card-copy small,.voyage-directory-link,.voyage-kicker) { color: #dae4cb; }
@media (max-width: 1000px) {
  body[data-platform="island"] .game-topbar { padding: 16px 22px; }
  .voyage-page { width: calc(100% - 40px); }
  .voyage-map-layout { grid-template-columns: minmax(0,1fr) 220px; }
  .voyage-island-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 700px) {
  body[data-platform="island"] .game-topbar { padding: 12px 16px; }
  body[data-platform="island"] .brand-info { position: static; width: auto; height: auto; clip-path: none; white-space: normal; }
  body[data-platform="island"] .brand-info h1 { font-size: .95rem; }
  body[data-platform="island"] .brand-info p { display: none; }
  .voyage-page { width: calc(100% - 24px); margin-bottom: 28px; }
  .voyage-intro { align-items: start; padding: 18px 2px; gap: 10px; flex-wrap: wrap; }
  .voyage-intro h2 { font-size: 1.75rem; }
  .voyage-intro p:not(.voyage-kicker) { font-size: .84rem; }
  .voyage-directory-link { font-size: .8rem; padding: 5px 0; }
  .voyage-welcome { padding: 17px; }
  .voyage-welcome h2 { font-size: 1.05rem; }
  .voyage-welcome p:last-child { font-size: .8rem; }
  .voyage-seal { display: none; }
  .voyage-traveler { padding: 12px 15px; gap: 12px; }
  body[data-platform="island"] .visitor-strip { flex-basis: 100%; flex-wrap: wrap; }
  body[data-platform="island"] .rpg-hud-bar { flex-wrap: wrap; }
  .voyage-map-layout { grid-template-columns: minmax(0,1fr); }
  .voyage-map { height: 440px; }
  body[data-platform="island"] .explorer-console { border: 0; border-top: 1px solid #becdbb; border-radius: 0; }
  body[data-platform="island"] .explorer-console > summary { display: flex; padding: 13px 17px; border: 0; border-radius: 0; min-height: 46px; }
  body[data-platform="island"] .explorer-console-body { max-height: 470px; height: auto; }
  body[data-platform="island"] .view-hints { display: block; font-size: .64rem; }
  .voyage-section-heading { display: block; }
  .voyage-section-heading h2 { font-size: 1.2rem; }
  .voyage-section-heading > p { margin-top: 7px; }
  .voyage-island-grid { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .voyage-island-card { min-height: 112px; padding: 17px; }
}

body[data-platform="island"]:is(.modal-open,.island-dialog-open) { overflow: hidden; }
.voyage-map-caption { position: absolute; z-index: 23; inset: 16px 19px auto; display: flex; justify-content: space-between; gap: 10px; color: #526f65; font-size: .72rem; pointer-events: none; }
.voyage-map-caption span:first-child { background: #f3f7e6df; padding: 6px 11px; border-radius: 20px; }
.voyage-map-caption span:last-child { padding-top: 6px; }
.voyage-compass { position: absolute; z-index: 23; bottom: 20px; right: 20px; line-height: 1.2; text-align: center; color: #6c9185; font-size: 1.4rem; pointer-events: none; }
@media (max-width:700px) { .voyage-map-caption { font-size: .63rem; inset: 12px 12px auto; } .voyage-map-caption span:last-child { display: none; } .voyage-compass { font-size: 1.15rem; bottom: 62px; right: 14px; } }

@media (max-width:700px) {
  body[data-platform="island"] .brand-section { display: grid; grid-template-columns: 32px minmax(0,1fr); gap: 7px 8px; }
  body[data-platform="island"] .brand-logo { width:32px; height:32px; }
  body[data-platform="island"] .brand-logo svg { width:26px; height:26px; }
  body[data-platform="island"] .brand-info h1 { font-size:.8rem; line-height:1.5; }
  body[data-platform="island"] .brand-section .site-language-switch { grid-column:1/-1; justify-self:start; }
}

/* Enter directly into the map. The guide and six cards remain one click away. */
body[data-platform="island"][data-island-layout="play"] {
  height: 100dvh; min-height: 0; overflow: hidden;
  display: grid; grid-template-rows: auto minmax(0,1fr);
}
body[data-platform="island"][data-island-layout="play"] .game-topbar { width: 100%; min-height: 62px; padding: 9px 22px; gap: 12px; }
body[data-platform="island"][data-island-layout="play"] .brand-info p { display: none; }
body[data-platform="island"][data-island-layout="play"] .voyage-page { width: 100%; height: 100%; min-height: 0; margin: 0; }
body[data-platform="island"][data-island-layout="play"] :is(.voyage-intro,.voyage-welcome,.voyage-directory) { display: none; }
body[data-platform="island"][data-island-layout="play"] .voyage-card { height: 100%; display: grid; grid-template-rows: auto minmax(0,1fr); border-radius: 0; border: 0; border-top: 1px solid #bdcbb9; box-shadow: none; }
body[data-platform="island"][data-island-layout="play"] .voyage-traveler { padding: 7px 22px; gap: 7px 22px; }
body[data-platform="island"][data-island-layout="play"] .voyage-map-layout { min-height: 0; position: relative; }
body[data-platform="island"][data-island-layout="play"] .voyage-map { height: 100%; min-height: 0; }
body[data-platform="island"][data-island-layout="play"] .explorer-console { min-height: 0; }
body[data-platform="island"][data-island-layout="play"] .explorer-console-body { height: 100%; min-height: 0; }
body[data-platform="island"] .voyage-layout-toggle { min-height: 40px; padding: 7px 12px; font-size: .8rem; color: #365e54; border: 1px solid #a7b99d; background: #ecf0dd; box-shadow: none; white-space: normal; }
@media(max-width:700px) {
  body[data-platform="island"][data-island-layout="play"] .game-topbar { padding: 8px 12px; min-height: 0; gap: 8px; }
  body[data-platform="island"][data-island-layout="play"] .voyage-traveler { padding: 6px 12px; gap: 6px; }
  body[data-platform="island"][data-island-layout="play"] .visitor-strip { flex-basis: auto; font-size: .75rem; }
  body[data-platform="island"][data-island-layout="play"] .rpg-hud-bar { gap: 6px; }
  body[data-platform="island"][data-island-layout="play"] .hud-exp-text { display: none; }
  body[data-platform="island"][data-island-layout="play"] .explorer-console { position: absolute; top: 10px; right: 10px; width: min(260px,calc(100% - 20px)); max-height: calc(100% - 20px); border: 1px solid #a5bca8; border-radius: 10px; z-index: 30; overflow: auto; box-shadow: 0 4px 15px #31574b20; }
  body[data-platform="island"][data-island-layout="play"] .explorer-console:not([open]) { width: auto; }
  body[data-platform="island"][data-island-layout="play"] .explorer-console > summary { padding: 10px 13px; }
  body[data-platform="island"][data-island-layout="play"] .explorer-console-body { height: auto; max-height: none; }
  body[data-platform="island"][data-island-layout="play"] .voyage-map-caption span:last-child { display: none; }
}
@media(max-width:700px) {
  body[data-platform="island"] .adventure-tools { align-items: center; gap: 5px; }
  body[data-platform="island"] .adventure-actions { gap: 5px; flex: 0 0 auto; }
  body[data-platform="island"] .adventure-action.c-game-btn { width: 40px; min-width: 40px; min-height: 40px; padding: 5px; flex: 0 0 40px; }
  body[data-platform="island"] .adventure-button-copy { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  body[data-platform="island"] .voyage-layout-toggle { min-height: 40px; padding: 6px 8px; flex-shrink: 0; max-width: 100px; font-size: .75rem; white-space: normal; }
  body[data-platform="island"] .game-settings > summary { min-height: 40px; width: 40px; }
}

/* A lesson shares the screen with the live map instead of covering it. */
body[data-platform="island"].quest-open .voyage-map-layout { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
body[data-platform="island"].quest-open .voyage-map { grid-column: 1; grid-row: 1; }
body[data-platform="island"] .quest-drawer-overlay { position: static; inset: auto; z-index: auto; grid-column: 2; grid-row: 1; min-width: 0; min-height: 0; overflow: hidden; border-left: 1px solid #b8cbb8; }
body[data-platform="island"] .quest-drawer { position: static; inset: auto; width: 100%; height: 100%; min-width: 0; min-height: 0; box-shadow: none; animation: none; }
body[data-platform="island"] .drawer-body { min-width: 0; min-height: 0; overscroll-behavior: contain; }
body[data-platform="island"].quest-open .explorer-console { position: absolute; top: 10px; right: calc(50% + 10px); width: min(240px,calc(50% - 20px)); max-height: calc(100% - 20px); z-index: 30; overflow: auto; border: 1px solid #a5bca8; border-radius: 10px; box-shadow: 0 4px 15px #31574b20; }
body[data-platform="island"].quest-open .explorer-console:not([open]) { width: auto; }
body[data-platform="island"].quest-open .explorer-console > summary { display: flex; padding: 10px 13px; min-height: 44px; cursor: pointer; }
body[data-platform="island"].quest-open .explorer-console-body { height: auto; max-height: none; }
@media(max-width:700px) {
  body[data-platform="island"].quest-open { height: auto; min-height: 100dvh; overflow-y: auto; display: block; }
  body[data-platform="island"].quest-open .voyage-page { height: auto; }
  body[data-platform="island"].quest-open .voyage-card { height: auto; display: block; }
  body[data-platform="island"].quest-open .voyage-map-layout { grid-template-columns: minmax(0,1fr); grid-template-rows: 320px minmax(560px,75dvh); }
  body[data-platform="island"].quest-open .quest-drawer-overlay { grid-column: 1; grid-row: 2; border-left: 0; border-top: 1px solid #b8cbb8; }
  body[data-platform="island"].quest-open .explorer-console { right: 10px; width: min(260px,calc(100% - 20px)); max-height: 300px; }
  body[data-platform="island"].quest-open .drawer-header { padding: 12px 16px; }
}

body[data-platform="island"].quest-open:is(.modal-open,.island-dialog-open) { overflow: hidden; }

/* A small, optional greeting stays inside the map half and never covers a quest. */
.island-journey-status { position: absolute; z-index: 24; top: 52px; left: 12px; max-width: calc(100% - 30px); box-sizing: border-box; margin: 0; padding: 7px 11px; border: 1px solid #8caa95; border-radius: 10px; background: #f9f9e9ed; color: #31594a; font-size: .75rem; line-height: 1.5; pointer-events: none; }
.encounter-card { position: absolute; z-index: 28; bottom: 46px; left: 12px; width: min(370px,calc(100% - 24px)); box-sizing: border-box; padding: 12px; background: #fffdf4; color: #294e40; border: 2px solid #92ad90; border-radius: 14px; box-shadow: 0 4px 14px #31594a25; font-size: .82rem; line-height: 1.6; text-align: left; }
.encounter-card[hidden],.island-journey-status[hidden] { display: none; }
.encounter-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.encounter-top strong { font-size: .95rem; }
.encounter-card p { margin: 5px 0; }
.encounter-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.encounter-card button { min-height: 36px; padding: 5px 9px; border: 1px solid #9bae8f; border-radius: 8px; background: #f5efd7; color: #355b48; font: inherit; cursor: pointer; }
.encounter-top button { flex-shrink: 0; min-width: 36px; }
.encounter-card button:focus-visible { outline: 3px solid #237b8d; outline-offset: 2px; }
.encounter-card button:hover { background: #e6efd7; }
#neighbourChoice { display: block; width: 100%; min-height: 40px; padding: 6px; margin: 6px 0; border: 1px solid #9caf97; border-radius: 8px; background: #fffdf4; color: #31594a; font: inherit; }
body:is(.modal-open,.island-dialog-open) .encounter-card { visibility: hidden; }
@media(max-width:700px) {
  .encounter-card { bottom: 8px; padding: 8px; font-size: .72rem; line-height: 1.4; max-height: calc(100% - 55px); overflow-y: auto; }
  .encounter-card button { min-height: 40px; }
  .island-journey-status { top: 48px; font-size: .65rem; }
}

/* Read the greeting, the visitor's response, then the neighbour's answer. */
.encounter-card { display: flex; flex-direction: column; gap: 8px; width: min(400px,calc(100% - 24px)); max-height: min(470px,calc(100% - 70px)); }
.encounter-top,.encounter-footer,#encounterChoices { flex-shrink: 0; }
.encounter-log { display: flex; flex-direction: column; gap: 9px; min-height: 0; max-height: 250px; overflow-y: auto; overscroll-behavior: contain; padding: 2px 3px; margin: 0; list-style: none; }
.encounter-line { align-self: flex-start; width: fit-content; max-width: 92%; }
.encounter-speaker { display: block; margin: 0 3px 3px; font-size: .7rem; font-weight: 700; color: #536958; }
.encounter-card .encounter-bubble { margin: 0; padding: 8px 10px; background: #f2eddd; border: 1px solid #dbd2b7; border-radius: 3px 12px 12px 12px; }
.encounter-line-visitor { align-self: flex-end; }
.encounter-line-visitor .encounter-speaker { text-align: right; }
.encounter-card .encounter-line-visitor .encounter-bubble { background: #dfefde; border-color: #b8d1b3; border-radius: 12px 3px 12px 12px; }
.encounter-card .encounter-prompt { font-size: .75rem; color: #536958; margin: 0; }
.encounter-actions { margin-top: 5px; }
.encounter-footer { display: flex; justify-content: space-between; gap: 6px; flex-wrap: wrap; border-top: 1px dashed #d2dbc6; padding-top: 7px; }
.encounter-footer button:last-child { margin-left: auto; }
@media(max-width:700px) {
  .encounter-card { bottom: 62px; gap: 5px; overflow: hidden; max-height: calc(100% - 70px); }
  body[data-platform="island"]:has(#islandEncounter:not([hidden])) #social-floating-tools { visibility: hidden; }
  .encounter-log { max-height: 190px; gap: 6px; }
  .encounter-speaker { font-size: .65rem; }
  .encounter-card .encounter-bubble { padding: 6px 8px; }
  .encounter-card .encounter-prompt { font-size: .7rem; }
}
