/* Shared mobile reading layout for personal memorials and the public museums. */
@media (max-width:820px) {
  body .cs-page[data-mobile-compact] .cs-profile-wrap,
  body #memorial-proposal #museum-original .cs-page[data-mobile-compact] .cs-profile-wrap {
    width:calc(100% - 28px);margin:8px auto 0;padding:0;zoom:1;
  }
  body .cs-page[data-mobile-compact] .cs-profile-wrap::before {display:none}
  .cs-mobile-marker {position:relative;isolation:isolate;width:100%;padding-bottom:10px}
  body .cs-page[data-mobile-compact] .cs-mobile-marker .cs-inscription,
  body #memorial-proposal #museum-original .cs-page[data-mobile-compact] .cs-mobile-marker .cs-inscription {
    width:calc((100% - 40px)/2);max-width:235px;min-width:min(100%,132px);min-height:90px;height:auto;
    aspect-ratio:auto;margin:0 auto;padding:18px 8px 16px;overflow:visible;
    background-size:100% 100%;border-radius:16px;gap:0;
  }
  body .cs-page[data-mobile-compact] .cs-mobile-marker .cs-inscription::before {inset:5px;border-radius:12px}
  body .cs-page[data-mobile-compact] .cs-mobile-marker .cs-inscription-name,
  body #memorial-proposal #museum-original .cs-page[data-mobile-compact] .cs-mobile-marker .cs-inscription-name {
    margin:0;max-width:100%;font-size:18px;line-height:1.4;letter-spacing:-.025em;
    transform:none;overflow-wrap:anywhere;word-break:normal;
  }
  /* Keep the honorific beside the final name character, even when a long name wraps. */
  .cs-mobile-marker .cs-inscription-name-tail {display:inline-block;white-space:nowrap}
  .cs-mobile-marker .cs-inscription-honorific {font-size:.78em;font-weight:500;letter-spacing:0}
  body .cs-page[data-mobile-compact] .cs-mobile-marker .cs-inscription-years,
  body #memorial-proposal #museum-original .cs-page[data-mobile-compact] .cs-mobile-marker .cs-inscription-years {
    margin:5px 0 0;font-size:11px;line-height:1.5;letter-spacing:.04em;transform:none;
  }
  .cs-mobile-marker .cs-inscription-rule {display:none}
  /* Preserve the smaller stone, with enough room for the name and years. */
  body:not([data-linked-sample]) #memorial-proposal #museum-original .cs-page[data-mobile-compact] .cs-mobile-marker .cs-inscription {
    width:calc((100% - 40px)*.35);max-width:164.5px;min-width:min(100%,132px);min-height:70px;padding:10px 6px;
  }
  body .cs-page[data-mobile-compact] .cs-mobile-marker .cs-inscription-ground,
  body #memorial-proposal #museum-original .cs-page[data-mobile-compact] .cs-mobile-marker .cs-inscription-ground {
    position:absolute;top:auto;bottom:0;left:50%;right:auto;width:min(55%,430px);max-width:100%;
    height:auto;aspect-ratio:3/1;margin:0;transform:translateX(-50%);z-index:1;
  }
  .cs-mobile-marker .cs-inscription-flower-bridge {display:none!important}
  body .cs-page[data-mobile-compact] .cs-mobile-inscription-quote,
  body #memorial-proposal #museum-original .cs-page[data-mobile-compact] .cs-mobile-inscription-quote {
    position:relative;inset:auto;z-index:4;width:100%;max-width:540px;margin:5px auto 0;
    padding:0 3px;color:#4b584b;font:400 14px/1.65 'Gowun Batang',Batang,serif;
    letter-spacing:0;transform:none;text-shadow:none;-webkit-text-stroke:0;mix-blend-mode:normal;
    text-align:center;word-break:keep-all;overflow-wrap:anywhere;text-wrap:balance;
  }
  .cs-mobile-inscription-quote .cs-inscription-phrase {display:inline-block;max-width:100%;vertical-align:top}

  /* Welcome text, two independent disclosures, then the actual exhibition spaces. */
  #memorial-proposal #museum-original .cs-page[data-mobile-compact] {padding-bottom:0}
  #memorial-proposal #museum-original .cs-page[data-mobile-compact] .cs-hero {padding:8px 0}
  .museum-site-header {display:none}
  #memorial-proposal .museum-topbar {min-height:48px;padding:4px 14px;flex-wrap:nowrap}
  #memorial-proposal[data-mobile-walkthrough] .museum-topbar [data-curation-toggle] {display:none}
  #memorial-proposal[data-mobile-walkthrough] #visitor-welcome {display:block;margin:14px auto 0}
  #memorial-proposal .museum-mobile-intro {margin:12px auto 24px;display:grid;gap:8px}
  #memorial-proposal .museum-mobile-disclosure {min-width:0;border:1px solid #d2dacb;border-radius:14px;background:#f8faf4;overflow:hidden}
  #memorial-proposal .museum-mobile-disclosure>summary {
    display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;
    padding:12px 16px;list-style:none;color:#254b32;font:500 15px/1.6 Pretendard,sans-serif;cursor:pointer;
  }
  #memorial-proposal .museum-mobile-disclosure>summary::-webkit-details-marker {display:none}
  #memorial-proposal .museum-mobile-disclosure>summary::after {content:'+';font-size:22px;font-weight:400}
  #memorial-proposal .museum-mobile-disclosure[open]>summary::after {content:'−'}
  #memorial-proposal .museum-mobile-disclosure>summary:focus-visible {outline:2px solid #365d3d;outline-offset:-4px;border-radius:14px}
  #memorial-proposal .museum-mobile-disclosure .curation-invitation {padding:18px 16px;border:0;border-top:1px solid #d2dacb}
  #memorial-proposal .museum-mobile-disclosure .curation-register-header,
  #memorial-proposal .museum-mobile-disclosure .curation-choices small {display:none}
  #memorial-proposal .museum-mobile-disclosure .curation-register-intro {margin-top:0;font-size:14px}
  #memorial-proposal .museum-mobile-disclosure .curation-choices button {min-height:44px;padding:10px 12px}
  #memorial-proposal .museum-mobile-disclosure .curation-answer {min-height:0;margin:12px 0 0}
  #memorial-proposal .museum-mobile-disclosure .arrival-briefing {width:100%;margin:0;padding:16px;border:0;border-top:1px solid #d2dacb;border-radius:0}
  #memorial-proposal .museum-mobile-disclosure .arrival-heading h2 {font-size:17px}
  #memorial-proposal .museum-mobile-disclosure .arrival-heading .eyebrow {display:none}
  #memorial-proposal[data-mobile-walkthrough] .linked-return {margin:8px auto;font-size:12px}
  #memorial-proposal[data-mobile-walkthrough] .functional-wayfinding {display:none}
  #memorial-proposal[data-mobile-walkthrough] #memorial-space-panel {padding-top:0}
  #memorial-proposal .museum-walkthrough-space {min-width:0;padding:24px 0 30px;border-top:1px solid #dcdccd;scroll-margin-top:12px}
  #memorial-proposal .museum-walkthrough-title {margin:0 auto 18px;color:#294b35;font:700 25px/1.5 'Gowun Batang',Batang,serif;letter-spacing:-.04em}
  #memorial-proposal .museum-walkthrough-title:focus-visible {outline:2px solid #365d3d;outline-offset:4px}
  #memorial-proposal[data-mobile-walkthrough] .museum-walkthrough-space .floor-composition {margin:0 auto;padding-top:0;padding-bottom:0}
  #memorial-proposal[data-mobile-walkthrough] .museum-walkthrough-space .overview-heading,
  #memorial-proposal[data-mobile-walkthrough] .museum-walkthrough-space [data-landscape]>summary {display:none}
  #memorial-proposal[data-mobile-walkthrough] .museum-walkthrough-space .room:not([hidden]) {display:block!important;padding-top:0;padding-bottom:0;background:transparent}
  #memorial-proposal[data-mobile-walkthrough] .museum-walkthrough-space .room-heading,
  #memorial-proposal[data-mobile-walkthrough] .museum-walkthrough-space .extra-room-heading {margin-bottom:18px}
  #memorial-proposal[data-mobile-walkthrough] .museum-walkthrough-space :is(.gallery-room,.news-room,.extra-room) :is(.room-heading,.extra-room-heading)>:is(h2,.eyebrow,span) {display:none}
  #memorial-proposal[data-mobile-walkthrough] .museum-walkthrough-space [data-life-navigation] {margin:16px auto;display:flex;flex-wrap:wrap;gap:6px}
  #memorial-proposal[data-mobile-walkthrough] .museum-walkthrough-space [data-life-navigation] button {min-height:44px;padding:9px 12px}
  #memorial-proposal[data-mobile-walkthrough] .museum-walkthrough-space .reading-heading {margin:20px auto 14px}
  #memorial-proposal[data-mobile-walkthrough] .museum-walkthrough-space .space-guidance {margin:0 auto 18px}

  /* Personal spaces use their existing record tabs and permission-filtered panels. */
  body .cs-welcome .cs-welcome-visual,
  body .cs-welcome .cs-welcome-label,
  body .cs-welcome .cs-welcome-rule {display:none}
  body .cs-welcome .cs-welcome-card {display:block;max-width:440px}
  body .cs-welcome .cs-welcome-content {padding:24px 20px}
  body .cs-welcome .cs-welcome-portrait {width:68px;height:68px;margin:0 auto 12px}
  body .cs-welcome .cs-welcome-content h2 {font-size:23px;line-height:1.5;margin:0 0 12px}
  body .cs-welcome .cs-welcome-copy {font-size:13px;line-height:1.7;margin:0 0 16px}
  body .cs-welcome .cs-welcome-note {margin-top:12px}
  body .cs-page[data-mobile-compact] .cs-marble-tabs-wrap {position:relative;top:auto;margin:18px auto 0;padding:0 12px}
  body .cs-page[data-mobile-compact] .cs-marble-tabs {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:0;background:none;box-shadow:none;border:0}
  body .cs-page[data-mobile-compact] .cs-marble-tab,
  body .cs-page[data-mobile-compact] .cs-marble-tab[aria-selected=true] {min-width:0;min-height:44px;flex-basis:auto;padding:9px 3px;border-radius:10px;justify-content:center}
  body .cs-page[data-mobile-compact] .cs-marble-tab>i,
  body .cs-page[data-mobile-compact] .cs-marble-tab>svg,
  body .cs-page[data-mobile-compact] .cs-marble-tab small {display:none}
  body .cs-page[data-mobile-compact] .cs-marble-tab strong {font:500 13px/1.5 'Noto Sans KR',sans-serif;letter-spacing:-.04em}
}
