/* Theme choice, diary-local decoration and future defaults share one accessible dialog. */
.stationery-overlay.stationery-page {
  position: static;
  inset: auto;
  z-index: auto;
  display: block;
  width: 100%;
  padding: 0 0 24px;
  background: transparent;
}
.stationery-page .stationery-dialog {
  width: 100%;
  max-height: none;
  overflow: visible;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--oru-surface);
  color: var(--oru-on-surface);
}
.stationery-page .stationery-header {
  position: sticky;
  top: 0;
  z-index: 3;
  flex-direction: row-reverse;
  justify-content: flex-end;
  padding: 0;
  min-height: 56px;
  border-bottom: 0;
  background: var(--oru-surface);
}
.stationery-page .stationery-header h2 { flex: 1; text-align: center; margin-right: 44px; font: 700 16px/1.3 Pretendard,sans-serif; }
.stationery-page #stationery-close { padding: 0; border: 0; background: transparent; color: var(--oru-on-surface); }
.stationery-page .stationery-dialog-scroll { overflow: visible; padding: 10px 0 18px; }
.stationery-page .stationery-collections { margin-inline: 0; padding-inline: 0; }
.stationery-page .stationery-footer { padding: 12px 0; border-top: 1px solid var(--oru-border-subtle); }
.stationery-page .stationery-footer > div > button:not(#stationery-apply) { display: none; }
.stationery-page .stationery-footer #stationery-apply { min-height: 48px; width: 100%; }
.stationery-page .stationery-footer > div { display: block; }
.stationery-dialog { width:min(760px,100%); }
.stationery-header { gap:12px; }
.stationery-header h2 { flex:1; font:600 18px/1.4 Pretendard,sans-serif; }
.stationery-header button { flex:0 0 44px; padding:8px; display:grid; place-items:center; }
.stationery-dialog .hidden { display:none!important; }
.stationery-dialog-scroll { display:flex; flex-direction:column; gap:18px; }
#stationery-settings-intro { color:color-mix(in srgb,currentColor 75%,transparent); font-size:13px; line-height:1.7; margin:0; }
.stationery-editor-tabs { display:flex; gap:5px; padding:4px; background:var(--stationery-editor-sage-soft); border-radius:12px; }
.stationery-editor-tabs button { flex:1; color:inherit; background:transparent; }
.stationery-editor-tabs [aria-selected="true"],.stationery-editor-tabs [aria-pressed="true"] { background:var(--stationery-editor-paper); box-shadow:0 1px 4px #0001; font-weight:600; }
#stationery-theme-panel,#stationery-font-panel,#stationery-sticker-tools { min-width:0; }
.stationery-collections { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; overflow:visible; }
.stationery-dialog .stationery-collection { min-width:0; width:100%; flex-shrink:1; padding:8px; }
.stationery-collection strong { min-height:0; font-size:13px; }
.stationery-theme-mini { display:block; min-width:0; overflow:hidden; border-radius:8px; pointer-events:none; }
.stationery-theme-mini .stationery-surface { margin:0; width:100%; box-shadow:none; }
.stationery-preview-pane { position:static; min-width:0; margin:0; }
#stationery-modal[data-page="editor"] #stationery-preview { max-height:230px; overflow:auto; overscroll-behavior:contain; border:1px solid var(--stationery-editor-line); border-radius:12px; }
#stationery-modal[data-page="editor"] .stationery-preview-label { font-size:12px; margin-bottom:8px; }
#stationery-modal[data-page="detail"] .stationery-preview-label { display:none; }
#stationery-modal[data-page="detail"] #stationery-preview { max-height:none; }
/* The large-paper toggle is for small screens only (see the media query below).
   It must win over the generic header button rule on wider screens. */
#stationery-modal .stationery-header .stationery-preview-toggle { display: none; }

/* Keep the paper in view while choosing materials; the large preview remains optional. */
@media (max-width: 639px), (max-height: 500px) {
  #stationery-modal[data-page="editor"] .stationery-header { gap: 4px; }
  #stationery-modal[data-page="editor"] .stationery-header h2 { margin-right: auto; }
  #stationery-modal[data-page="editor"] .stationery-header .stationery-preview-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    padding-inline: 6px;
    font-size: 11px;
    color: var(--stationery-editor-sage);
  }
  #stationery-modal[data-page="editor"] .stationery-dialog {
    height: 100%;
  }
  #stationery-modal[data-page="editor"] .stationery-dialog-scroll {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    overflow: hidden;
    padding-block: 8px;
  }
  #stationery-modal[data-page="editor"] .stationery-preview-pane {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  #stationery-modal[data-page="editor"] #stationery-preview {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
  }
  #stationery-modal[data-page="editor"] .stationery-editor-tabs {
    flex: 0 0 auto;
  }
  #stationery-modal[data-page="editor"] #stationery-theme-panel,
  #stationery-modal[data-page="editor"] #stationery-font-panel,
  #stationery-modal[data-page="editor"] #stationery-sticker-tools {
    flex: 0 0 clamp(124px, 23dvh, 190px);
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  #stationery-modal[data-page="editor"] .stationery-footer {
    padding-block: 8px;
  }
  #stationery-modal[data-page="editor"] .stationery-footer > p {
    margin-bottom: 4px;
  }
  /* 종이 아래 선택 영역에서는 테마를 작은 카드 한 줄로 넘겨 보며 이름까지 한눈에 읽게 한다. */
  #stationery-modal[data-page="editor"] .stationery-collections {
    display: flex;
    gap: 8px;
    margin-inline: 0;
    padding: 2px 0 4px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  #stationery-modal[data-page="editor"] .stationery-collections::-webkit-scrollbar { display: none; }
  #stationery-modal[data-page="editor"] .stationery-collection {
    flex: 0 0 104px;
    width: 104px;
    gap: 3px;
    padding: 5px;
    scroll-snap-align: start;
  }
  #stationery-modal[data-page="editor"] .stationery-collection .stationery-theme-mini {
    height: clamp(72px, calc(23dvh - 78px), 110px);
  }
  #stationery-modal[data-page="editor"] .stationery-collection > strong,
  #stationery-modal[data-page="editor"] .stationery-collection > span:last-child {
    min-height: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #stationery-modal[data-page="editor"] .stationery-collection > strong { font-size: 12px; line-height: 1.35; }
  #stationery-modal[data-page="editor"] .stationery-collection > span:last-child { font-size: 11px; }
  #stationery-modal[data-page="editor"].stationery-preview-expanded .stationery-editor-tabs,
  #stationery-modal[data-page="editor"].stationery-preview-expanded #stationery-theme-panel,
  #stationery-modal[data-page="editor"].stationery-preview-expanded #stationery-font-panel,
  #stationery-modal[data-page="editor"].stationery-preview-expanded #stationery-sticker-tools {
    display: none !important;
  }
  /* 압축 배치에서는 기본 안내만 숨기고, 방금 한 동작의 결과(구입 결과·붙일 수 없는 스티커 등)는 남긴다. */
  #stationery-modal[data-page="editor"] .stationery-footer > #stationery-status[data-tone="hint"] {
    display: none;
  }
  #stationery-modal[data-page="editor"] .stationery-rotate-handle {
    top: -24px;
  }
  @media (min-width: 640px) {
    #stationery-modal[data-page="editor"]:not([data-purchase="open"]) .stationery-footer {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
    }
    #stationery-modal[data-page="editor"]:not([data-purchase="open"]) .stationery-footer #stationery-reload:not(.hidden) {
      margin-right: auto;
      margin-bottom: 0;
    }
  }
  #stationery-modal[data-page="editor"].stationery-preview-expanded #stationery-preview > .stationery-surface {
    min-height: 100%;
    display: flex;
    flex-direction: column;
  }
  #stationery-modal[data-page="editor"].stationery-preview-expanded #stationery-preview .stationery-canvas {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
  }
  #stationery-modal[data-page="editor"].stationery-preview-expanded #stationery-preview .td-sheet {
    flex: 1 1 auto;
  }
}
@media (max-width: 639px) {
  html[data-ios-text-scale]:not([data-ios-text-scale="1"]) #stationery-modal[data-page="editor"] .stationery-dialog-scroll {
    overflow-y: auto;
  }
  html[data-ios-text-scale]:not([data-ios-text-scale="1"]) #stationery-modal[data-page="editor"] .stationery-preview-pane {
    flex: 0 0 auto;
  }
  html[data-ios-text-scale]:not([data-ios-text-scale="1"]) #stationery-modal[data-page="editor"] #stationery-preview {
    flex: 0 0 auto;
    min-height: 150px;
    overflow: visible;
  }
  html[data-ios-text-scale]:not([data-ios-text-scale="1"]) #stationery-modal[data-page="editor"] #stationery-sticker-tools {
    flex: 0 0 auto;
    min-height: 190px;
    overflow: visible;
  }
  html[data-ios-text-scale]:not([data-ios-text-scale="1"]) #stationery-modal[data-page="editor"] #stationery-theme-panel,
  html[data-ios-text-scale]:not([data-ios-text-scale="1"]) #stationery-modal[data-page="editor"] #stationery-font-panel {
    flex: 0 0 auto;
    overflow: visible;
  }
}
@media (max-height: 500px) and (min-width: 640px) {
  #stationery-modal[data-page="editor"] .stationery-dialog-scroll {
    overflow-y: auto;
  }
  #stationery-modal[data-page="editor"] .stationery-preview-pane {
    flex: 0 0 auto;
  }
  #stationery-modal[data-page="editor"] #stationery-preview {
    flex: 0 0 auto;
    min-height: 150px;
  }
}
.stationery-product-materials { display:grid; gap:7px; }
.stationery-product-materials p { padding:10px 12px; border-radius:10px; font-size:12px; background:var(--stationery-editor-sage-soft); margin:0; }
.stationery-included { border-top:1px solid var(--stationery-editor-line); padding-top:18px; }
.stationery-included h3 { margin:0 0 8px; font-size:15px; font-weight:600; }
.stationery-included h4 { margin:24px 0 12px; font-size:13px; font-weight:600; }
.stationery-included>p,.stationery-restore-area p { color:color-mix(in srgb,currentColor 74%,transparent); font-size:12px; line-height:1.7; }
.stationery-included-grid,.stationery-sticker-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.stationery-included-sticker { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; min-width:0; padding:14px 4px 10px; border:1px solid var(--stationery-editor-line); border-radius:12px; background:color-mix(in srgb,var(--stationery-editor-paper) 75%,transparent); }
.stationery-included-sticker>img,.stationery-included-sticker>.stationery-sticker-image { width:64px; height:64px; object-fit:contain; }
/* A sprite box needs a definite size: when every sticker in a grid row is taller than
   wide, the crop's height:100% has no row height to resolve against and collapses. */
.stationery-included-sticker>.stationery-sprite { flex:none; width:64px; height:64px; }
.stationery-included-sticker>span:last-child { font-size:11px; line-height:1.45; text-align:center; overflow-wrap:anywhere; }
#stationery-stickers { display:flex; flex-direction:column; gap:20px; }
#stationery-stickers h3 { font-size:13px; font-weight:600; margin:0 0 9px; }
.stationery-sticker-grid .stationery-sticker-choice { padding:9px 4px; min-width:0; }
.stationery-sticker-choice>img,.stationery-sticker-choice>.stationery-sticker-image { width:52px; height:52px; object-fit:contain; }
.stationery-sticker-choice>.stationery-sprite { flex:none; width:52px; height:52px; }
.stationery-sticker-choice>span:last-child { font-size:11px; }
#stationery-font-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.stationery-dialog .stationery-font-choice { display:flex; flex-direction:column; gap:10px; align-items:stretch; text-align:left; padding:15px; border:1px solid var(--stationery-editor-line); background:transparent; min-width:0; }
.stationery-font-choice[aria-checked="true"] { border-color:var(--stationery-editor-sage); background:var(--stationery-editor-sage-soft); box-shadow:inset 0 0 0 1px var(--stationery-editor-sage); }
.stationery-font-choice strong { font:500 12px/1.4 Pretendard,sans-serif; }
.stationery-font-sentence { display:block; font-size:17px; line-height:1.7; overflow-wrap:anywhere; }
[data-font="serif"] .stationery-font-sentence { font-family:"Maru Buri",MaruBuri,serif; }
[data-font="soft"] .stationery-font-sentence { font-family:"Oru Gowun Dodum",sans-serif; }
[data-font="handwriting"] .stationery-font-sentence { font-family:"Oru Nanum Pen",serif; font-size:21px; }
[data-font="gowun-batang"] .stationery-font-sentence { font-family:"Oru Gowun Batang",serif; }
[data-font="gaegu"] .stationery-font-sentence { font-family:"Oru Gaegu","Oru Nanum Pen",serif; font-size:20px; }
.stationery-restore-area { padding-top:6px; }
.stationery-purchase-area { padding:12px 0; display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.stationery-purchase-area p { flex-basis:100%; font-size:12px; line-height:1.65; }
.stationery-purchase-area .stationery-purchase-data { color:color-mix(in srgb,currentColor 72%,transparent); }
.stationery-purchase-policies { flex-basis:100%; display:flex; flex-wrap:wrap; gap:8px 14px; font-size:12px; }
.stationery-purchase-policies a { color:#59673f; text-decoration:underline; text-underline-offset:3px; }
.stationery-purchase-area button { flex:1; min-height:44px; }
#stationery-purchase { background:#59673f; color:#fffdf6; padding:10px 16px; }
.stationery-restore-area button { display:block; margin:4px auto 0; color:color-mix(in srgb,currentColor 75%,transparent); background:transparent; }
.stationery-footer > p:empty { display:none; }
.stationery-footer>div { flex-wrap:wrap; align-items:center; }
.stationery-footer #stationery-apply { flex:1; min-width:100px; }
.stationery-footer #stationery-reload { font-size:11px; margin-bottom:8px; }
.stationery-surface[data-version="2"] .stationery-body { overflow-wrap:anywhere; }
@media(min-width:640px){
  #stationery-modal[data-page="editor"] .stationery-collections { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .stationery-included-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media(max-width:400px){
  .stationery-overlay { padding:8px 5px; }
  .stationery-header,.stationery-footer { padding:12px; }
  .stationery-dialog-scroll { padding:14px 12px 22px; }
  #stationery-font-options { grid-template-columns:minmax(0,1fr); }
  .stationery-footer>div { gap:4px; }
  .stationery-dialog button { padding-left:9px; padding-right:9px; }
}

/* Paid theme purchase (2026-09-29): one purchase area in the fixed footer, never inside the scroll. */
/* grid-column matters only in the landscape footer grid (stationery-editor.css), where the purchase
   area would otherwise take the auto column and squeeze the status line to zero width. */
.stationery-footer > .stationery-purchase-area { padding: 0 0 6px; grid-column: 1 / -1; }
.stationery-dialog .stationery-purchase-policies .stationery-link-button {
  flex: none;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #59673f;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.dark .stationery-purchase-policies a,
.dark .stationery-dialog .stationery-purchase-policies .stationery-link-button { color: #bac99a; }
/* A theme page keeps its purchase or apply action above the tab bar while the long preview scrolls. */
.stationery-page[data-page="detail"] .stationery-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: var(--oru-surface);
  box-shadow: 0 -10px 16px -14px rgb(0 0 0 / .28);
}
/* The app's scroll area keeps a bottom padding (16px on phones, 48px on wider screens), so the
   sticky footer stops above it; a strip of the page colour fills that gap under the footer. */
.stationery-page[data-page="detail"] .stationery-footer::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 48px;
  background: var(--oru-surface);
}
html[data-ios-text-scale]:not([data-ios-text-scale="1"]) .stationery-page[data-page="detail"] .stationery-footer {
  position: static;
  box-shadow: none;
}
html[data-ios-text-scale]:not([data-ios-text-scale="1"]) .stationery-page[data-page="detail"] .stationery-footer::after { content: none; }
/* Without an in-app store (web, Android TWA) the footer holds only notices and scrolls with the preview. */
#stationery-modal.stationery-page[data-page="detail"][data-footer="static"] .stationery-footer { position: static; box-shadow: none; }
#stationery-modal.stationery-page[data-page="detail"][data-footer="static"] .stationery-footer::after { content: none; }
/* A landscape phone gives the long preview its height back; the actions follow the preview. */
@media (max-height: 500px) {
  #stationery-modal.stationery-page[data-page="detail"] .stationery-footer { position: static; box-shadow: none; }
  #stationery-modal.stationery-page[data-page="detail"] .stationery-footer::after { content: none; }
}
/* The list's back arrow and a theme page's back arrow share the left edge of the reversed header. */
.stationery-page #stationery-back { order: 1; padding: 0; border: 0; background: transparent; color: var(--oru-on-surface); }
/* Writing: Undo and Cancel share the last footer row with Buy, above the purchase notices. */
#stationery-modal[data-page="editor"][data-purchase="open"] .stationery-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
#stationery-modal[data-page="editor"][data-purchase="open"] .stationery-footer > .stationery-purchase-area,
#stationery-modal[data-page="editor"][data-purchase="open"] .stationery-footer > div { display: contents; }
#stationery-modal[data-page="editor"][data-purchase="open"] .stationery-footer > p,
#stationery-modal[data-page="editor"][data-purchase="open"] .stationery-purchase-area > p,
#stationery-modal[data-page="editor"][data-purchase="open"] .stationery-purchase-policies,
#stationery-modal[data-page="editor"][data-purchase="open"] #stationery-billing-retry,
#stationery-modal[data-page="editor"][data-purchase="open"] #stationery-reload { flex: 1 0 100%; margin: 0; }
#stationery-modal[data-page="editor"][data-purchase="open"] .stationery-footer > div > button:not(#stationery-apply) { order: 5; flex: 0 0 auto; }
#stationery-modal[data-page="editor"][data-purchase="open"] #stationery-purchase { order: 6; flex: 1 1 120px; min-height: 44px; }
/* Theme cards: paid and owned states read as a label, not as a faint price. */
.stationery-collection > .stationery-collection-status[data-kind="paid"],
.stationery-collection > .stationery-collection-status[data-kind="owned"] {
  align-self: flex-start;
  max-width: 100%;
  padding: 1px 7px;
  border: 1px solid color-mix(in srgb, currentColor 38%, transparent);
  border-radius: 999px;
  color: inherit;
  font-weight: 600;
}
#stationery-modal[data-page="editor"] .stationery-collection > span.stationery-collection-status {
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
}
.stationery-theme-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.stationery-dialog .stationery-theme-jump button {
  min-height: 36px;
  padding: 4px 14px;
  border: 1px solid var(--stationery-editor-line);
  border-radius: 999px;
  background: transparent;
  font-size: 12px;
}
.stationery-product-summary { display: grid; gap: 10px; }
.stationery-product-summary > p { margin: 0; }
#stationery-product-description { font-size: 13px; line-height: 1.7; }
.stationery-product-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.stationery-product-badge {
  padding: 2px 9px;
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.5;
}
.stationery-sticker-peek { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
#stationery-product-peek > * { flex: none; width: 44px; height: 44px; object-fit: contain; }
.stationery-preview-peek {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.4;
  color: color-mix(in srgb, currentColor 78%, transparent);
}
.stationery-preview-peek .stationery-sticker-peek { gap: 4px; }
.stationery-preview-peek .stationery-sticker-peek > * { flex: none; width: 28px; height: 28px; object-fit: contain; }
@media (max-width: 639px), (max-height: 500px) {
  /* The account line is the only purchase copy that can yield space in the compact writing footer. */
  #stationery-modal[data-page="editor"] #stationery-purchase-info[data-plain="true"] { display: none; }
  #stationery-modal[data-page="editor"] .stationery-preview-peek { flex: 0 0 auto; }
  /* If a very tall footer leaves the paper little room, the taste strip is clipped, never drawn over the tabs. */
  #stationery-modal[data-page="editor"][data-purchase="open"] .stationery-preview-pane { overflow: hidden; }
  #stationery-modal[data-page="editor"][data-theme-jump="shown"] #stationery-theme-panel {
    flex-basis: clamp(160px, calc(23dvh + 42px), 232px);
  }
  /* A purchase footer grown by large text, guest notices or a failure never presses the choices
     to nothing: they keep a floor and scroll, and whatever is left over scrolls the dialog. */
  #stationery-modal[data-page="editor"][data-purchase="open"] .stationery-dialog { overflow-y: auto; overscroll-behavior: contain; }
  #stationery-modal[data-page="editor"][data-purchase="open"] .stationery-dialog-scroll {
    min-height: min(300px, 55vh);
    min-height: min(300px, 55dvh);
    overflow-y: auto;
  }
  #stationery-modal[data-page="editor"][data-purchase="open"] .stationery-preview-pane { min-height: 200px; }
}
@media (max-height: 600px) {
  #stationery-modal[data-page="editor"] .stationery-preview-peek { display: none; }
}
/* On short screens the purchase footer would leave the paper only a sliver, so an unowned
   paid theme scrolls the choices under the fixed footer instead (as large text already does). */
@media (max-width: 639px) and (max-height: 699px), (max-height: 500px) {
  #stationery-modal[data-page="editor"][data-purchase="open"] .stationery-dialog-scroll { overflow-y: auto; }
  #stationery-modal[data-page="editor"][data-purchase="open"] .stationery-preview-pane { flex: 0 0 auto; }
  #stationery-modal[data-page="editor"][data-purchase="open"] #stationery-preview { flex: 0 0 auto; min-height: 150px; }
  #stationery-modal[data-page="editor"][data-purchase="open"] #stationery-theme-panel,
  #stationery-modal[data-page="editor"][data-purchase="open"] #stationery-font-panel,
  #stationery-modal[data-page="editor"][data-purchase="open"] #stationery-sticker-tools { flex: 0 0 auto; overflow: visible; }
}

/* Product browsing shows the entire pack before the paper and keeps notices in the body. */
#stationery-modal[data-page="detail"] #stationery-product-peek { display: none; }
#stationery-modal[data-page="detail"] .stationery-preview-label { display: flex; }
#stationery-modal[data-page="detail"] .stationery-preview-pane { flex: 0 0 auto; }
#stationery-modal[data-page="detail"] #stationery-preview {
  max-height: none;
  overflow: visible;
  border: 1px solid var(--stationery-editor-line);
  border-radius: 12px;
}
.stationery-dialog .stationery-product-preview-toggle {
  flex: 0 0 auto;
  width: 100%;
  min-height: 44px;
  white-space: normal;
  text-align: left;
  border: 1px solid var(--stationery-editor-line);
  background: var(--stationery-editor-sage-soft);
  color: inherit;
}
.stationery-product-preview-toggle::after { content: ' ＋'; }
.stationery-product-preview-toggle[aria-expanded="true"]::after { content: ' −'; }
.stationery-purchase-disclosures {
  padding: 14px 0 4px;
  border-top: 1px solid var(--stationery-editor-line);
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.stationery-purchase-disclosures > p { margin: 0 0 8px; }
.stationery-purchase-disclosures .stationery-purchase-data { color: color-mix(in srgb,currentColor 72%,transparent); }
.stationery-dialog .stationery-purchase-disclosures .stationery-purchase-policies .stationery-link-button {
  min-height: 44px;
  padding: 8px 0;
}
.stationery-purchase-disclosures .stationery-purchase-policies { align-items: center; }
.stationery-purchase-disclosures .stationery-purchase-policies a { display: inline-flex; align-items: center; min-height: 44px; }
.stationery-dialog .stationery-shop-entry {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 0;
  min-height: 44px;
  border: 1px solid var(--stationery-editor-line);
  background: var(--stationery-editor-sage-soft);
  color: inherit;
  white-space: normal;
}
#stationery-modal[data-page="editor"].stationery-preview-expanded #stationery-shop-entry { display: none; }
.stationery-shop-entry .material-symbols-outlined { font-size: 18px; }
#stationery-modal[data-origin="write"] .stationery-dialog-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
#stationery-modal[data-origin="write"] .stationery-header h2 { overflow-wrap: anywhere; }
#stationery-modal[data-origin="write"] .stationery-footer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
#stationery-modal[data-origin="write"] .stationery-footer > div { display: none; }
#stationery-modal[data-origin="write"] .stationery-footer > p { margin: 0; min-height: 0; }
#stationery-modal[data-origin="write"] .stationery-purchase-area { padding: 0; }
#stationery-modal[data-origin="write"] #stationery-return-editor {
  flex: 0 0 auto;
  width: 100%;
  min-height: 44px;
  white-space: normal;
  color: inherit;
  background: var(--stationery-editor-sage-soft);
  border: 1px solid var(--stationery-editor-line);
}
@media (max-width: 350px) {
  #stationery-modal[data-page="detail"] .stationery-included-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
/* Enlarged text and landscape use one outer scroll instead of a large fixed action stack. */
@media (max-height: 500px) {
  #stationery-modal[data-origin="write"] { align-items: flex-start; overflow-y: auto; }
  #stationery-modal[data-origin="write"] .stationery-dialog { max-height: none; }
  #stationery-modal[data-origin="write"] .stationery-dialog-scroll { overflow: visible; }
}
html[data-ios-text-scale]:not([data-ios-text-scale="1"]) #stationery-modal[data-origin="write"] { align-items: flex-start; overflow-y: auto; }
html[data-ios-text-scale]:not([data-ios-text-scale="1"]) #stationery-modal[data-origin="write"] .stationery-dialog { max-height: none; }
html[data-ios-text-scale]:not([data-ios-text-scale="1"]) #stationery-modal[data-origin="write"] .stationery-dialog-scroll { overflow: visible; }
