/* Another Dawn mobile shell. Texture belongs around content, not behind it. */
.realm-game { --dawn-line:#a88a59; --dawn-paper:#f4e7ca; --dawn-surface:#171c30; }
.realm-game .viewport::after { box-shadow:inset 0 0 0 1px #dbc28b25; }
.realm-game .play-dock { background:linear-gradient(150deg,#343046f5,#141d30fa);border-color:#a88a5988;box-shadow:0 8px 25px #05091799,inset 0 1px #efd7a33b;border-radius:22px; }
.realm-game .play-dock button { min-height:58px;color:#ead8b6; }
.realm-game .play-dock button:hover,.realm-game .play-dock button:focus-visible { background:#edd7a51c; }
.realm-game #dockSelf { display:none; }
.realm-game .play-dock { width:276px; }
.realm-game .field-vitals { display:flex;top:12px;left:12px;right:65px;max-width:none;gap:4px; }
.realm-game .field-vitals span { background:#151b2fe8;border:1px solid #8b799075;border-radius:8px;padding:6px 8px;font-size:10px;box-shadow:0 2px 7px #0004; }
.realm-game .field-vitals span:first-child { border-bottom:2px solid #df877e; }
.realm-game .field-vitals span:nth-child(2) { border-bottom:2px solid #8fb6eb; }
.realm-game .field-vitals span:nth-child(3) { border-bottom:2px solid #88bba1; }
.realm-game .field-vitals span:nth-child(4) { display:none; }
.realm-game .field-vitals strong { color:#fff0d8; }
.realm-game .world.expanded #fieldLocation { display:block!important;position:fixed;top:6px;left:12px;max-width:60vw;padding:4px 10px;border-radius:8px;background:#171d30e8;color:#eed7ac;font:12px Georgia,serif; }
.realm-game .world.expanded .field-vitals { top:38px; }
.realm-game .field-top { left:auto;right:12px;top:9px;gap:6px; }
.realm-game .field-top #touchHelp { position:absolute;top:54px;right:0;width:44px;height:44px;font:0/1 system-ui;border:1px solid #a28c6670; }
.realm-game #touchHelp::after { content:'?';font-size:20px;font-family:Georgia,serif; }
.realm-game .vitals { display:none; }
.realm-game .world-bar { padding:9px 16px; }
.realm-game .world-bar h1 { font-size:20px;margin:0; }
.realm-game .world-bar .eyebrow { display:none; }
.realm-game #position { padding:5px 8px;font-size:10px; }
.realm-game .target-card { border-color:#b39361;background:linear-gradient(135deg,#353047f7,#171e31fc);padding:10px 12px;border-radius:18px;max-height:55%;overflow:auto; }
.realm-game .target-heading { padding-bottom:6px; }
.realm-game .target-actions { display:flex;flex-wrap:wrap;gap:6px; }
.realm-game .target-actions button { flex:1 1 110px;min-height:44px;border-radius:10px;border:1px solid #89738b;background:#282a40; }
.realm-game .target-actions .mint { background:#254539;color:#e3f6e8;border-color:#86b699; }
.realm-game .target-actions .danger { background:#4b2934;border-color:#b97b80; }
.realm-game .target-card:not([hidden]) ~ .field-tools { visibility:hidden; }
.realm-game .viewport:has(.target-card:not([hidden])) .map-hint { visibility:hidden; }
.realm-game .map-hint { background:#151c2fe6;border-color:#9d835c55;color:#ecdfc6;backdrop-filter:none; }
.realm-game dialog { border-color:#9c825c;background:linear-gradient(155deg,#2d2940,#171d30 45%);color:#eee5d5; }
.realm-game .panel-sheet,.realm-game #gameDialog { padding:16px;border-radius:24px;box-shadow:0 20px 70px #05071399,inset 0 1px #f7d89f35; }
.realm-game .panel-sheet[open] { display:flex;flex-direction:column;overflow:hidden;height:min(82dvh,760px); }
.realm-game .sheet-heading { padding:0 0 10px;background:#25263d;position:relative;flex:none;z-index:3; }
.realm-game .sheet-handle { width:36px;height:3px;background:#baa479;margin:0 auto 10px;border-radius:5px; }
.realm-game .panel-sheet #panelContent { flex:1;overflow:auto;min-height:0;overscroll-behavior:contain; }
.realm-game #journalFeed { display:flex;flex-direction:column;min-height:0; }
.realm-game .journal-tabs { display:flex;gap:6px;position:sticky;top:0;background:#1c2035;padding:5px 0 10px;z-index:2; }
.realm-game .journal-tabs button { min-height:44px;flex:1;margin:0;border-radius:12px;background:#25273d; }
.realm-game .journal-tabs button[aria-pressed=true] { color:#ffedbc;border-color:#c2a168;background:linear-gradient(130deg,#58432f,#38324b); }
.dawn-section-art { padding:18px;border:1px solid #b5985e66;border-radius:14px;margin-bottom:14px;background:linear-gradient(90deg,#181c32ee,#282237a0),url('/assets/interface/realm-welcome.png') 50% 70%/cover; }
.bag-status { background:#263c39;border-left:2px solid #97bca1;padding:10px;border-radius:8px;line-height:1.4; }
.dawn-section-art h2 { margin:5px 0;font:25px/1.2 Georgia,serif;color:#f4dbab; }
.realm-game .held-item { cursor:pointer;background:linear-gradient(110deg,#363144,#202638);border-color:#a78b62; }
.realm-game .inventory { gap:6px; }
.realm-game .panel-sheet .inventory { max-height:26dvh;overflow:auto;overscroll-behavior:contain;padding:3px; }
.realm-game .inventory button { border-radius:10px;min-height:48px;background:linear-gradient(140deg,#2f2d42,#1c2335);border-color:#61556e; }
.realm-game .inventory button[aria-pressed=true] { border:2px solid #f0cc83;box-shadow:0 0 0 2px #dbc68c20;background:#514331; }
.item-details { border:1px solid #8c7759;border-radius:14px;padding:12px;background:#151c2f;margin:12px 0; }
.item-detail-heading { display:flex;align-items:center;gap:12px; }
.item-detail-heading canvas { width:64px;height:64px;flex:none;image-rendering:pixelated;background:radial-gradient(ellipse,#97856830,transparent 70%); }
.item-detail-heading h3 { margin:3px 0;font:20px Georgia,serif;color:#f1d6a0; }
.item-detail-heading p { margin:0; }
.item-detail-actions { display:flex;gap:7px;flex-wrap:wrap; }
.item-detail-actions button { min-height:44px;margin:0;flex:1 1 90px;border-color:#897354;background:#343147; }
.realm-game #bag > .action-grid { border-top:1px solid #7e6d5040;padding-top:10px; }
.realm-game #bag > .action-grid [data-command]:not([data-command=get]) { display:none; }
.realm-game #bag > .action-grid { display:flex; }
.realm-game #bag > .action-grid [data-command=get] { flex:1; }
.realm-game #gameDialog { width:min(480px,calc(100vw - 16px)); }
.realm-game #gameDialog[open] { display:flex;flex-direction:column;overflow:hidden; }
.realm-game #gameDialog #dialogBody { min-height:0;overflow:auto; }
.realm-game #gameDialog #dialogTitle,.realm-game #gameDialog .shop-summary,.realm-game #closeGameDialog { flex:none; }
.realm-game #gameDialog #dialogTitle { padding-right:50px;min-height:40px; }
.realm-game #gameDialog #dialogDescription {color:#f4eedc;opacity:1;font-size:1rem;line-height:1.65;flex:0 1 auto;max-height:32dvh;overflow:auto;overscroll-behavior:contain;padding-right:4px;}
.realm-game #gameDialog #dialogDescription:focus-visible {outline:2px solid #e3c385;outline-offset:3px;}
.realm-game #gameDialog .dialog-identity { position:absolute;right:16px;top:16px;margin:0;width:40px;height:40px; }
.realm-game #gameDialog #dialogStatus { flex:none;max-height:15dvh;overflow:auto; }
.realm-game #gameDialog::backdrop,.realm-game #panelDialog::backdrop { background:#080e235c;backdrop-filter:blur(2px); }
.dialog-identity { width:48px;height:48px;border-radius:12px;background:url('/assets/interface/realm-emblems.png') 0% 100%/400% 300%;box-shadow:0 3px 15px #0004;margin-bottom:8px; }
#gameDialog[data-kind=shop] .dialog-identity { background-position:33.3333% 100%; }
.realm-game #dialogTitle { margin:8px 0 16px;font-size:25px;line-height:1.2; }
.realm-game #dialogTitle::before { display:none; }
.realm-game #dialogBody { display:grid;gap:8px; }
.realm-game #dialogBody button { margin:0;min-height:48px;text-align:left;border:1px solid #7f6f83;border-radius:13px;background:linear-gradient(120deg,#343047,#22283b);color:#f2e7d4;padding:12px; }
.realm-game #dialogBody .shop-offer { display:flex;flex-direction:row;align-items:center;gap:12px; }
.realm-game .shop-item-icon { width:58px;height:58px;flex:none;image-rendering:pixelated;background:radial-gradient(ellipse,#efd29320,transparent); }
.shop-copy { display:grid;gap:5px; }
.shop-copy strong { font:19px/1.2 Georgia,serif;color:#f4ddb2; }
.shop-price { color:#e7bd77;font-size:13px; }
.shop-copy small { font-size:11px;line-height:1.35;color:#b9c4d7; }
.realm-game #dialogBody button:disabled { opacity:.72;cursor:not-allowed; }
.shop-summary { display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 0;border-top:1px solid #807054;margin-top:12px;font-size:13px;color:#efca88; }
.shop-summary button { margin:0;min-height:44px;font-size:12px; }
.realm-game #dialogStatus { padding:12px;border-left:3px solid #8cc5a8;background:#203b35;border-radius:8px;line-height:1.5;font-size:14px;color:#e9f2da; }
.quest-card { padding:14px;border:1px solid #81705d;border-radius:13px;background:#1c2336;margin:10px 0; }
.quest-card h3 { margin:6px 0;color:#efcf94;font:21px Georgia,serif; }
.quest-card p { line-height:1.5; }
.quest-card progress { width:100%;height:8px;accent-color:#97cba6; }
.quest-card button { min-height:44px;margin-right:8px; }
.quest-card.complete { opacity:.7; }
.quest-reward { color:#e9c380!important; }
.quest-empty { padding:16px;border:1px dashed #827462;border-radius:12px;line-height:1.6; }
.guide-grid { display:grid;gap:10px; }
.guide-grid p { padding:12px;border:1px solid #746280;border-radius:12px;margin:0;line-height:1.5; }
.guide-grid strong { display:block;color:#edcf96;margin-bottom:5px; }
.realm-game button { transition:background-color 120ms,border-color 120ms,transform 120ms; }
.realm-game button:active:not(:disabled) { transform:translateY(1px); }
.realm-game button:focus-visible,.realm-game [role=button]:focus-visible { outline:2px solid #f8d28d;outline-offset:3px; }
[hidden] { display:none!important; }
@media(min-width:761px) and (min-height:501px) {
  .realm-game .world { height:calc(100dvh - 150px);min-height:380px; }
  .realm-game .world.expanded {height:100dvh;}
  .realm-game .viewport {min-height:0;}
}
@media(max-width:760px) {
  .realm-game .app { padding:0 max(6px,env(safe-area-inset-right)) 0 max(6px,env(safe-area-inset-left)); }
  .realm-game .app > header { height:58px; }
  .realm-game .app > footer { display:none; }
  .realm-game .world { height:calc(100dvh - 64px - env(safe-area-inset-bottom));min-height:240px;border-radius:17px; }
  .realm-game .world.expanded { height:100dvh; }
  .realm-game .world.with-buttons { min-height:0; }
  .realm-game .play-dock { bottom:max(9px,env(safe-area-inset-bottom)); }
  .realm-game .panel-sheet,.realm-game #gameDialog { margin:auto auto max(5px,env(safe-area-inset-bottom));max-height:82dvh;width:calc(100vw - 12px);max-width:480px; }
  .realm-game #panelDialog:has(#journalFeed:not([hidden])) { max-height:78dvh; }
  .realm-game .panel-sheet #messages { height:32dvh;min-height:90px; }
  .realm-game #gameDialog #dialogBody { max-height:42dvh;overflow:auto;overscroll-behavior:contain; }
  .realm-game #dialogTitle { font-size:23px; }
  .realm-game #gameDialog .dialog-identity { float:left;margin-right:12px;width:40px;height:40px; }
  .realm-game .world-bar h1 { font-size:17px; }
  .realm-game .map-hint { bottom:84px;max-width:calc(100% - 110px);padding:6px 9px; }
}
@media(max-height:500px) and (min-width:540px) {
  .realm-game .app > header { display:none; }
  .realm-game .world { height:calc(100dvh - 8px); }
  .realm-game .panel-sheet,.realm-game #gameDialog { margin:auto 6px auto auto;max-height:calc(100dvh - 12px);width:min(440px,65vw); }
  .realm-game #gameDialog #dialogBody { max-height:43dvh; }
  .realm-game .field-vitals { top:8px; }
}
@media(prefers-reduced-motion:no-preference) {
  .realm-game dialog[open] { animation:dawn-sheet-in 180ms ease-out; }
  @keyframes dawn-sheet-in { from { opacity:0;translate:0 10px; } to {opacity:1;translate:0 0;} }
}
.realm-game:has(#graphicsEffects:not(:checked)) dialog[open] {animation:none;}
@media(prefers-reduced-motion:reduce) { .realm-game button {transition:none;} }

