/* Sprint 076.4 — Japanese washi Journey Postcard restoration */
.postcard-preview{position:relative;isolation:isolate;overflow:hidden;min-height:320px;padding:34px 42px 30px 110px;border:1px solid rgba(79,62,44,.18);border-radius:24px;color:#35312c;background:linear-gradient(135deg,#f8f1df,#ead2bd);box-shadow:inset 0 0 0 10px rgba(255,252,242,.32),0 18px 45px rgba(43,35,28,.14);font-family:"Noto Serif JP","Yu Mincho","Hiragino Mincho ProN",serif}
.postcard-preview::before{content:"";position:absolute;inset:0;z-index:-2;opacity:.32;background:repeating-linear-gradient(4deg,rgba(91,73,50,.08) 0 1px,transparent 1px 20px),repeating-linear-gradient(94deg,rgba(255,255,255,.22) 0 1px,transparent 1px 34px)}
.postcard-preview::after{content:"";position:absolute;z-index:-1;width:230px;height:230px;right:-55px;bottom:-90px;border-radius:50%;background:rgba(220,169,134,.24)}
.postcard-preview.theme-garden{background:linear-gradient(135deg,#edf2df,#cdddbf);color:#2f392f}
.postcard-preview.theme-night{background:linear-gradient(135deg,#172b49,#536783);color:#243047;box-shadow:inset 0 0 0 10px rgba(241,238,220,.25),0 18px 45px rgba(8,17,31,.28)}
.postcard-kanji{position:absolute;left:26px;top:28px;bottom:28px;writing-mode:vertical-rl;text-orientation:upright;letter-spacing:.22em;font-size:21px;font-weight:700;color:#a4473b}
.postcard-mark{font-family:system-ui,sans-serif;font-size:12px;font-weight:800;letter-spacing:.16em;text-transform:uppercase;opacity:.68}
.postcard-date{position:absolute;right:28px;top:28px;font:600 12px system-ui,sans-serif;letter-spacing:.08em}
.postcard-stamp{position:absolute;right:26px;top:50px;width:72px;height:72px;border:2px solid #a4473b;border-radius:50%;opacity:.72}
.postcard-stamp i{position:absolute;left:7px;right:7px;height:1px;background:#a4473b}.postcard-stamp i:nth-child(1){top:25px}.postcard-stamp i:nth-child(2){top:35px}.postcard-stamp i:nth-child(3){top:45px}
.postcard-icon{display:grid;place-items:center;width:82px;height:82px;margin:44px 0 18px;border-radius:50%;background:rgba(255,255,255,.48);font-size:46px}
.postcard-preview h3{max-width:75%;margin:0 0 14px;font-size:clamp(25px,4vw,38px);line-height:1.35;letter-spacing:.02em}
.postcard-preview p{max-width:78%;margin:0;font-family:system-ui,sans-serif;line-height:1.7;opacity:.76}
.postcard-sign{margin-top:34px;padding-left:18px;border-left:5px solid #a4473b;font:700 12px system-ui,sans-serif;letter-spacing:.08em}
.postcard-seal{position:absolute;right:28px;bottom:25px;display:grid;place-items:center;width:48px;height:48px;border-radius:7px;background:#a4473b;color:#fff8e9;font-size:25px;font-weight:800}
.postcard-fallback[hidden]{display:none}.postcard-fallback{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;padding:20px;background:rgba(6,13,24,.76);backdrop-filter:blur(12px)}
.postcard-fallback-shell{width:min(680px,100%);max-height:92vh;overflow:auto;padding:24px;border-radius:24px;background:#fffaf0;color:#2c2925;box-shadow:0 26px 80px rgba(0,0,0,.42)}
.postcard-fallback-kicker{font:800 11px system-ui,sans-serif;letter-spacing:.17em;color:#a4473b}.postcard-fallback-shell h2{margin:.5rem 0}.postcard-fallback-shell img{display:block;width:100%;height:auto;margin:18px 0;border-radius:15px;box-shadow:0 10px 30px rgba(58,42,29,.18);touch-action:manipulation;-webkit-user-select:none;user-select:none}.postcard-fallback-shell small{display:block;margin:10px 0;color:#8b3029}
body.postcard-fallback-open{overflow:hidden}
@media(max-width:620px){.postcard-preview{min-height:300px;padding:30px 24px 26px 76px}.postcard-kanji{left:18px}.postcard-stamp{right:18px;transform:scale(.82);transform-origin:top right}.postcard-preview h3,.postcard-preview p{max-width:100%}.postcard-actions{display:grid;grid-template-columns:1fr}.postcard-actions button{width:100%}}


/* S077.40.7.6.26-R33 — date-matched Journey Postcard back (1–31) */
.postcard-preview{perspective:1200px}
.postcard-face{position:absolute;inset:0;width:100%;height:100%;backface-visibility:hidden;-webkit-backface-visibility:hidden;transition:transform .48s cubic-bezier(.2,.7,.2,1),opacity .2s ease;transform-style:preserve-3d}
.postcard-front{position:relative;min-height:252px;transform:rotateY(0deg)}
.postcard-back{display:grid;place-items:center;overflow:hidden;border-radius:inherit;background:#efe9df;transform:rotateY(180deg);opacity:0;pointer-events:none}
.postcard-back img{display:block;width:100%;height:100%;object-fit:contain;background:#efe9df}
.postcard-back-day{position:absolute;right:14px;bottom:12px;padding:5px 9px;border-radius:999px;background:rgba(35,30,25,.66);color:#fff;font:800 10px/1 system-ui,sans-serif;letter-spacing:.08em;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.postcard-preview.is-back .postcard-front{transform:rotateY(-180deg);opacity:0;pointer-events:none}
.postcard-preview.is-back .postcard-back{transform:rotateY(0deg);opacity:1;pointer-events:auto}
.postcard-side-actions{display:flex;align-items:center;gap:12px;margin-top:12px}
.postcard-side-actions .action-button{width:auto;min-width:120px;flex:0 0 auto}
.postcard-side-actions span{font-size:12px;line-height:1.5;color:var(--muted)}
@media(max-width:620px){.postcard-front{min-height:244px}.postcard-side-actions{align-items:flex-start;flex-direction:column}.postcard-side-actions .action-button{width:100%}.postcard-back-day{right:10px;bottom:10px}}
@media(prefers-reduced-motion:reduce){.postcard-face{transition:none}}

/* S077.40.7.6.26-R35 — postcard proportion + preview cleanup */
.postcard-preview{
  display:block!important;
  min-height:0!important;
  aspect-ratio:1.58/1;
  padding:0!important;
  border-radius:32px!important;
  border:1px solid rgba(95,103,116,.16)!important;
  box-shadow:0 18px 42px rgba(38,54,79,.16), inset 0 0 0 1px rgba(255,255,255,.35)!important;
  overflow:hidden;
}
.postcard-preview.theme-dawn{
  background:linear-gradient(135deg,#f4ede2 0%,#edf1f5 100%)!important;
  color:#30455b!important;
}
.postcard-preview.theme-garden{
  background:linear-gradient(135deg,#e8efe0 0%,#eef1e5 100%)!important;
  color:#304236!important;
}
.postcard-preview.theme-night{
  background:linear-gradient(135deg,#223453 0%,#5a6b86 100%)!important;
  color:#edf1f5!important;
}
.postcard-preview::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  opacity:1;
  background:
    linear-gradient(135deg,rgba(180,149,117,.08) 0%,rgba(180,149,117,0) 28%,rgba(145,168,188,0) 72%,rgba(145,168,188,.08) 100%),
    repeating-linear-gradient(4deg,rgba(91,73,50,.035) 0 1px,transparent 1px 24px),
    repeating-linear-gradient(94deg,rgba(255,255,255,.18) 0 1px,transparent 1px 38px);
  pointer-events:none;
}
.postcard-preview::after{display:none!important}
.postcard-front,
.postcard-back{
  position:absolute;
  inset:0;
  box-sizing:border-box;
  width:100%;
  height:100%;
  padding:28px 36px 30px 38px;
  border-radius:inherit;
}
.postcard-front::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:56px;
  opacity:.2;
  background:
    radial-gradient(circle at 18px 38px,transparent 15px,currentColor 16px 17px,transparent 18px) 0 0/42px 28px repeat-x,
    radial-gradient(circle at 39px 52px,transparent 15px,currentColor 16px 17px,transparent 18px) 0 0/42px 28px repeat-x;
  pointer-events:none;
}
.postcard-mark,
.postcard-date,
.postcard-postmark,
.postcard-jp-vertical,
.postcard-icon,
.postcard-preview h3,
.postcard-preview p,
.postcard-sign,
.postcard-hanko{position:relative;z-index:1}
.postcard-mark{position:absolute;top:28px;left:38px;font-size:12px;letter-spacing:.14em;opacity:.72}
.postcard-date{position:absolute;top:28px;right:36px;font:600 12px/1.2 system-ui,sans-serif;letter-spacing:.08em;opacity:.78}
.postcard-postmark{position:absolute;right:88px;top:82px;width:62px;height:62px;border:2px solid currentColor;border-radius:50%;display:grid;place-items:center;text-align:center;font-size:.48rem;font-weight:800;line-height:1.25;opacity:.38;transform:rotate(-8deg)}
.postcard-postmark::after{content:"";position:absolute;inset:7px;border:1px solid currentColor;border-radius:50%}
.postcard-jp-vertical{position:absolute;right:36px;top:92px;font-family:serif;font-weight:800;line-height:1.18;font-size:1rem;letter-spacing:.04em;opacity:.78;text-align:center;writing-mode:vertical-rl;text-orientation:upright}
.postcard-icon{display:grid;place-items:center;width:90px;height:70px;margin:96px 0 18px 16px;font-size:3.6rem;background:transparent}
.postcard-preview h3{max-width:72%;margin:22px 0 0 0;font-size:clamp(24px,3.5vw,46px);line-height:1.3;letter-spacing:.02em}
.postcard-preview p{max-width:78%;margin:18px 0 0 0;font-family:system-ui,sans-serif;font-size:clamp(16px,2vw,20px);line-height:1.65;opacity:.84}
.postcard-sign{position:absolute;left:38px;bottom:26px;padding-left:0;border-left:0;font:700 12px/1.2 system-ui,sans-serif;letter-spacing:.02em;opacity:.7;background:none!important}
.postcard-hanko{position:absolute;right:26px;bottom:22px;width:48px;height:48px;border-radius:7px;background:#b34a3f;color:#fff8ec;display:grid;place-items:center;font-family:serif;font-size:25px;font-weight:800;box-shadow:inset 0 0 0 2px rgba(255,255,255,.22)}
.postcard-back{padding:0;display:grid;place-items:center;background:#f1ece3}
.postcard-back img{width:100%;height:100%;object-fit:contain;background:#f1ece3}
@media(max-width:620px){
  .postcard-preview{aspect-ratio:1.38/1}
  .postcard-front,.postcard-back{padding:22px 22px 26px 22px}
  .postcard-mark{left:22px;top:22px}
  .postcard-date{right:22px;top:22px}
  .postcard-postmark{right:54px;top:74px;transform:scale(.86) rotate(-8deg);transform-origin:top right}
  .postcard-jp-vertical{right:18px;top:84px}
  .postcard-icon{margin:82px 0 14px 8px;width:84px;height:62px;font-size:3.2rem}
  .postcard-preview h3,.postcard-preview p{max-width:100%}
  .postcard-sign{left:22px;bottom:18px;font-size:11px}
}

/* S077.40.7.6.26-R36 — postcard typography overflow fix */
.postcard-front{overflow:hidden}
.postcard-icon{
  margin:82px 0 12px 10px!important;
  width:78px!important;
  height:60px!important;
  font-size:3rem!important;
}
.postcard-preview h3{
  max-width:70%!important;
  margin:8px 0 0 0!important;
  font-size:clamp(18px,3vw,28px)!important;
  line-height:1.24!important;
  max-height:calc(1.24em * 2.15);
  overflow:hidden;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}
.postcard-preview p{
  max-width:72%!important;
  margin:12px 0 0 0!important;
  font-size:clamp(13px,1.45vw,18px)!important;
  line-height:1.5!important;
  max-height:calc(1.5em * 3.15);
  overflow:hidden;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
}
.postcard-sign{
  font-size:11px!important;
  bottom:30px!important;
  max-width:58%!important;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.postcard-hanko{bottom:28px!important}
.postcard-postmark{top:78px!important}
.postcard-jp-vertical{top:88px!important}
@media(max-width:620px){
  .postcard-icon{margin:74px 0 10px 4px!important;width:70px!important;height:54px!important;font-size:2.7rem!important}
  .postcard-preview h3{max-width:100%!important;font-size:clamp(17px,5.8vw,24px)!important;max-height:calc(1.24em * 2.2)}
  .postcard-preview p{max-width:100%!important;font-size:clamp(12px,3.6vw,16px)!important;-webkit-line-clamp:2;max-height:calc(1.5em * 2.15)}
  .postcard-sign{max-width:70%!important;font-size:10px!important;bottom:20px!important}
}

/* S077.40.7.6.26-R37 — postcard overlap cleanup + remove diagonal stripes */
.postcard-preview::before{
  background:linear-gradient(135deg,rgba(255,255,255,.05),rgba(255,255,255,0) 42%,rgba(255,255,255,.04) 100%)!important;
}
.postcard-front{
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:flex-start!important;
  overflow:hidden!important;
}
.postcard-icon{
  flex:0 0 auto;
  margin:84px 0 10px 8px!important;
  width:72px!important;
  height:56px!important;
  font-size:2.8rem!important;
}
.postcard-preview h3{
  flex:0 0 auto;
  max-width:64%!important;
  margin:8px 0 0 12px!important;
  font-size:clamp(16px,2.2vw,24px)!important;
  line-height:1.28!important;
  letter-spacing:0!important;
  max-height:calc(1.28em * 2.2)!important;
  overflow:hidden!important;
  display:-webkit-box!important;
  -webkit-line-clamp:2!important;
  -webkit-box-orient:vertical!important;
}
.postcard-preview p{
  flex:0 0 auto;
  max-width:66%!important;
  margin:10px 0 0 12px!important;
  font-size:clamp(12px,1.2vw,16px)!important;
  line-height:1.52!important;
  letter-spacing:0!important;
  max-height:calc(1.52em * 2.2)!important;
  overflow:hidden!important;
  display:-webkit-box!important;
  -webkit-line-clamp:2!important;
  -webkit-box-orient:vertical!important;
  opacity:.9!important;
}
.postcard-sign{
  bottom:24px!important;
  left:38px!important;
  max-width:52%!important;
  font-size:10px!important;
}
.postcard-postmark{right:92px!important;top:84px!important;opacity:.34!important}
.postcard-jp-vertical{right:34px!important;top:92px!important}
.postcard-hanko{right:24px!important;bottom:24px!important}
@media(max-width:620px){
  .postcard-preview::before{background:linear-gradient(135deg,rgba(255,255,255,.05),rgba(255,255,255,0) 55%,rgba(255,255,255,.04) 100%)!important}
  .postcard-icon{margin:72px 0 8px 2px!important;width:64px!important;height:50px!important;font-size:2.35rem!important}
  .postcard-preview h3{max-width:70%!important;margin:6px 0 0 8px!important;font-size:clamp(15px,5vw,20px)!important}
  .postcard-preview p{max-width:70%!important;margin:8px 0 0 8px!important;font-size:clamp(11px,3.2vw,14px)!important}
  .postcard-sign{left:22px!important;bottom:18px!important;max-width:58%!important;font-size:9px!important}
  .postcard-postmark{right:52px!important;top:78px!important;transform:scale(.84) rotate(-8deg)!important}
  .postcard-jp-vertical{right:18px!important;top:86px!important}
}

/* S077.40.7.6.26-R38 — postcard content lift */
.postcard-icon{
  margin:52px 0 8px 8px!important;
}
.postcard-preview h3{
  margin:2px 0 0 12px!important;
}
.postcard-preview p{
  margin:8px 0 0 12px!important;
}
@media(max-width:620px){
  .postcard-icon{margin:46px 0 8px 2px!important}
  .postcard-preview h3{margin:2px 0 0 8px!important}
  .postcard-preview p{margin:6px 0 0 8px!important}
}

/* S077.40.7.6.26-R39 — front-side icon size tuned to frame */
.postcard-icon{
  width:56px!important;
  height:44px!important;
  font-size:2.15rem!important;
  margin:58px 0 8px 16px!important;
}
@media(max-width:620px){
  .postcard-icon{
    width:50px!important;
    height:40px!important;
    font-size:1.95rem!important;
    margin:50px 0 8px 10px!important;
  }
}

/* S077.40.7.6.26-R40 — postcard back image fit full frame */
.postcard-back{
  padding:18px 18px 30px 18px!important;
  box-sizing:border-box!important;
  align-items:center!important;
  justify-items:center!important;
  background:#f5f0e8!important;
}
.postcard-back img{
  display:block!important;
  width:auto!important;
  height:auto!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center center!important;
  margin:auto!important;
  border-radius:18px!important;
  background:#fffdfa!important;
  box-shadow:0 8px 22px rgba(60,48,36,.08)!important;
}
.postcard-back-day{z-index:2!important}
@media(max-width:620px){
  .postcard-back{padding:14px 14px 26px 14px!important}
  .postcard-back img{max-width:100%!important;max-height:100%!important;border-radius:14px!important}
}

/* S077.40.7.6.26-R41 — rebuilt landscape back assets, full original image visible */
.postcard-back{
  padding:0!important;
  background:#f5f0e8!important;
}
.postcard-back img{
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  max-height:none!important;
  object-fit:contain!important;
  object-position:center center!important;
  margin:0!important;
  border-radius:inherit!important;
  box-shadow:none!important;
  background:#f5f0e8!important;
}

/* S077.40.7.6.26-R42 — Android postcard front text overlap fix */
body.android-device .postcard-preview{
  aspect-ratio:1.18/1!important;
}
body.android-device .postcard-front{
  padding:18px 20px 52px 22px!important;
  overflow:hidden!important;
}
body.android-device .postcard-mark{
  top:18px!important;
  left:22px!important;
  font-size:11px!important;
}
body.android-device .postcard-date{
  top:18px!important;
  right:18px!important;
  font-size:11px!important;
}
body.android-device .postcard-icon{
  width:44px!important;
  height:34px!important;
  font-size:1.72rem!important;
  margin:38px 0 6px 6px!important;
}
body.android-device .postcard-preview h3{
  max-width:68%!important;
  margin:0 0 0 8px!important;
  font-size:clamp(14px,4.6vw,18px)!important;
  line-height:1.22!important;
  letter-spacing:0!important;
  word-break:break-word;
  overflow-wrap:anywhere;
  -webkit-line-clamp:2!important;
  max-height:calc(1.22em * 2.2)!important;
}
body.android-device .postcard-preview p{
  max-width:70%!important;
  margin:8px 0 0 8px!important;
  font-size:clamp(10px,3vw,13px)!important;
  line-height:1.45!important;
  letter-spacing:0!important;
  word-break:break-word;
  overflow-wrap:anywhere;
  -webkit-line-clamp:2!important;
  max-height:calc(1.45em * 2.2)!important;
}
body.android-device .postcard-sign{
  left:22px!important;
  bottom:14px!important;
  max-width:62%!important;
  font-size:8px!important;
}
body.android-device .postcard-postmark{
  right:46px!important;
  top:68px!important;
  transform:scale(.74) rotate(-8deg)!important;
  transform-origin:top right!important;
}
body.android-device .postcard-jp-vertical{
  right:16px!important;
  top:78px!important;
  font-size:.92rem!important;
}
body.android-device .postcard-hanko{
  right:18px!important;
  bottom:16px!important;
  width:42px!important;
  height:42px!important;
  font-size:22px!important;
}
@media(max-width:430px){
  .postcard-preview{aspect-ratio:1.14/1!important}
  .postcard-front{padding:18px 18px 52px 20px!important}
  .postcard-mark{top:18px!important;left:20px!important;font-size:10px!important}
  .postcard-date{top:18px!important;right:16px!important;font-size:10px!important}
  .postcard-icon{width:42px!important;height:32px!important;font-size:1.6rem!important;margin:36px 0 6px 4px!important}
  .postcard-preview h3{max-width:68%!important;font-size:clamp(13px,4.8vw,17px)!important;margin:0 0 0 6px!important}
  .postcard-preview p{max-width:70%!important;font-size:clamp(10px,3.2vw,12px)!important;margin:7px 0 0 6px!important}
  .postcard-sign{left:20px!important;bottom:12px!important;max-width:60%!important;font-size:7.5px!important}
  .postcard-postmark{right:42px!important;top:66px!important;transform:scale(.68) rotate(-8deg)!important}
  .postcard-jp-vertical{right:14px!important;top:76px!important;font-size:.86rem!important}
  .postcard-hanko{right:16px!important;bottom:14px!important;width:40px!important;height:40px!important;font-size:21px!important}
}

/* S077.40.7.6.26-R43 — Android / iPhone separate postcard optimization */
body.mobile-touch-device .postcard-preview{
  border-radius:26px!important;
}
body.mobile-touch-device .postcard-front{
  overflow:hidden!important;
}
body.mobile-touch-device .postcard-preview h3,
body.mobile-touch-device .postcard-preview p{
  word-break:break-word;
  overflow-wrap:anywhere;
  letter-spacing:0!important;
}

/* iPhone / iPad style: slightly more spacious, softer composition */
body.ios-device .postcard-preview{
  aspect-ratio:1.24/1!important;
}
body.ios-device .postcard-front{
  padding:20px 20px 50px 22px!important;
}
body.ios-device .postcard-mark{
  top:18px!important;
  left:22px!important;
  font-size:10.5px!important;
  letter-spacing:.12em!important;
}
body.ios-device .postcard-date{
  top:18px!important;
  right:18px!important;
  font-size:10.5px!important;
}
body.ios-device .postcard-icon{
  width:48px!important;
  height:36px!important;
  font-size:1.8rem!important;
  margin:42px 0 6px 6px!important;
}
body.ios-device .postcard-preview h3{
  max-width:67%!important;
  margin:2px 0 0 8px!important;
  font-size:clamp(14px,4.4vw,18px)!important;
  line-height:1.24!important;
  -webkit-line-clamp:2!important;
  max-height:calc(1.24em * 2.2)!important;
}
body.ios-device .postcard-preview p{
  max-width:69%!important;
  margin:8px 0 0 8px!important;
  font-size:clamp(10px,3vw,13px)!important;
  line-height:1.46!important;
  -webkit-line-clamp:2!important;
  max-height:calc(1.46em * 2.2)!important;
  opacity:.92!important;
}
body.ios-device .postcard-sign{
  left:22px!important;
  bottom:14px!important;
  max-width:61%!important;
  font-size:8px!important;
}
body.ios-device .postcard-postmark{
  right:46px!important;
  top:72px!important;
  transform:scale(.74) rotate(-8deg)!important;
  transform-origin:top right!important;
}
body.ios-device .postcard-jp-vertical{
  right:16px!important;
  top:80px!important;
  font-size:.9rem!important;
}
body.ios-device .postcard-hanko{
  right:18px!important;
  bottom:16px!important;
  width:42px!important;
  height:42px!important;
  font-size:22px!important;
}

/* Android style: even more conservative because text tends to render larger */
body.android-device .postcard-preview{
  aspect-ratio:1.18/1!important;
}
body.android-device .postcard-front{
  padding:18px 18px 52px 20px!important;
}
body.android-device .postcard-mark{
  top:18px!important;
  left:20px!important;
  font-size:10px!important;
  letter-spacing:.11em!important;
}
body.android-device .postcard-date{
  top:18px!important;
  right:16px!important;
  font-size:10px!important;
}
body.android-device .postcard-icon{
  width:42px!important;
  height:32px!important;
  font-size:1.6rem!important;
  margin:36px 0 6px 4px!important;
}
body.android-device .postcard-preview h3{
  max-width:66%!important;
  margin:0 0 0 6px!important;
  font-size:clamp(13px,4.6vw,17px)!important;
  line-height:1.2!important;
  -webkit-line-clamp:2!important;
  max-height:calc(1.2em * 2.2)!important;
}
body.android-device .postcard-preview p{
  max-width:68%!important;
  margin:7px 0 0 6px!important;
  font-size:clamp(9.5px,3vw,12px)!important;
  line-height:1.42!important;
  -webkit-line-clamp:2!important;
  max-height:calc(1.42em * 2.2)!important;
  opacity:.92!important;
}
body.android-device .postcard-sign{
  left:20px!important;
  bottom:12px!important;
  max-width:58%!important;
  font-size:7.5px!important;
}
body.android-device .postcard-postmark{
  right:42px!important;
  top:68px!important;
  transform:scale(.68) rotate(-8deg)!important;
  transform-origin:top right!important;
}
body.android-device .postcard-jp-vertical{
  right:14px!important;
  top:76px!important;
  font-size:.84rem!important;
}
body.android-device .postcard-hanko{
  right:16px!important;
  bottom:14px!important;
  width:40px!important;
  height:40px!important;
  font-size:21px!important;
}

@media(max-width:430px){
  body.ios-device .postcard-preview{aspect-ratio:1.18/1!important}
  body.ios-device .postcard-front{padding:18px 18px 48px 20px!important}
  body.ios-device .postcard-preview h3{font-size:clamp(13px,4.8vw,17px)!important}
  body.ios-device .postcard-preview p{font-size:clamp(9.5px,3.2vw,12px)!important}
  body.ios-device .postcard-postmark{right:42px!important;top:68px!important;transform:scale(.68) rotate(-8deg)!important}
  body.ios-device .postcard-jp-vertical{right:14px!important;top:76px!important;font-size:.84rem!important}

  body.android-device .postcard-preview{aspect-ratio:1.14/1!important}
  body.android-device .postcard-front{padding:16px 16px 46px 18px!important}
  body.android-device .postcard-preview h3{font-size:clamp(12px,4.8vw,16px)!important}
  body.android-device .postcard-preview p{font-size:clamp(9px,3.1vw,11.5px)!important}
  body.android-device .postcard-sign{font-size:7px!important;bottom:11px!important}
}

/* S077.40.7.6.26-R44 — dedicated tablet postcard optimization */
body.tablet-device .postcard-preview{
  aspect-ratio:1.46/1!important;
  border-radius:30px!important;
}
body.tablet-device .postcard-front{
  padding:26px 28px 64px 30px!important;
}
body.tablet-device .postcard-mark{
  top:24px!important;
  left:30px!important;
  font-size:11.5px!important;
  letter-spacing:.14em!important;
}
body.tablet-device .postcard-date{
  top:24px!important;
  right:26px!important;
  font-size:11.5px!important;
}
body.tablet-device .postcard-icon{
  width:64px!important;
  height:48px!important;
  font-size:2.2rem!important;
  margin:52px 0 10px 10px!important;
}
body.tablet-device .postcard-preview h3{
  max-width:69%!important;
  margin:4px 0 0 12px!important;
  font-size:clamp(18px,2.3vw,25px)!important;
  line-height:1.28!important;
  -webkit-line-clamp:2!important;
  max-height:calc(1.28em * 2.2)!important;
}
body.tablet-device .postcard-preview p{
  max-width:72%!important;
  margin:10px 0 0 12px!important;
  font-size:clamp(12px,1.55vw,17px)!important;
  line-height:1.52!important;
  -webkit-line-clamp:3!important;
  max-height:calc(1.52em * 3.2)!important;
  opacity:.92!important;
}
body.tablet-device .postcard-sign{
  left:30px!important;
  bottom:18px!important;
  max-width:63%!important;
  font-size:9px!important;
}
body.tablet-device .postcard-postmark{
  right:68px!important;
  top:86px!important;
  transform:scale(.86) rotate(-8deg)!important;
  transform-origin:top right!important;
  opacity:.34!important;
}
body.tablet-device .postcard-jp-vertical{
  right:24px!important;
  top:98px!important;
  font-size:1rem!important;
}
body.tablet-device .postcard-hanko{
  right:22px!important;
  bottom:18px!important;
  width:46px!important;
  height:46px!important;
  font-size:24px!important;
}

/* iPad: slightly more elegant spacing */
body.ios-tablet .postcard-preview{
  aspect-ratio:1.5/1!important;
}
body.ios-tablet .postcard-front{
  padding:28px 30px 66px 32px!important;
}
body.ios-tablet .postcard-icon{
  width:66px!important;
  height:50px!important;
  font-size:2.3rem!important;
  margin:54px 0 10px 12px!important;
}
body.ios-tablet .postcard-preview h3{
  max-width:70%!important;
  font-size:clamp(19px,2.25vw,26px)!important;
}
body.ios-tablet .postcard-preview p{
  max-width:72%!important;
  font-size:clamp(12.5px,1.5vw,17px)!important;
}
body.ios-tablet .postcard-postmark{
  right:74px!important;
  top:90px!important;
  transform:scale(.9) rotate(-8deg)!important;
}
body.ios-tablet .postcard-jp-vertical{
  right:26px!important;
  top:100px!important;
}

/* Android tablet: keep more safety for text rendering */
body.android-tablet .postcard-preview{
  aspect-ratio:1.42/1!important;
}
body.android-tablet .postcard-front{
  padding:24px 26px 62px 28px!important;
}
body.android-tablet .postcard-icon{
  width:58px!important;
  height:44px!important;
  font-size:2rem!important;
  margin:50px 0 8px 8px!important;
}
body.android-tablet .postcard-preview h3{
  max-width:67%!important;
  font-size:clamp(17px,2.15vw,23px)!important;
  line-height:1.24!important;
}
body.android-tablet .postcard-preview p{
  max-width:69%!important;
  font-size:clamp(11.5px,1.45vw,16px)!important;
  line-height:1.48!important;
  -webkit-line-clamp:2!important;
  max-height:calc(1.48em * 2.3)!important;
}
body.android-tablet .postcard-sign{
  max-width:60%!important;
  font-size:8.5px!important;
}
body.android-tablet .postcard-postmark{
  right:60px!important;
  top:84px!important;
  transform:scale(.8) rotate(-8deg)!important;
}
body.android-tablet .postcard-jp-vertical{
  right:22px!important;
  top:94px!important;
  font-size:.96rem!important;
}

/* Tablet landscape extra breathing room */
@media (min-width:900px) and (orientation:landscape){
  body.tablet-device .postcard-preview{aspect-ratio:1.56/1!important}
  body.tablet-device .postcard-preview h3{max-width:71%!important}
  body.tablet-device .postcard-preview p{max-width:74%!important}
}

/* S077.40.7.6.26-R45 — premium front + desktop layout + responsive back fit */

/* Premium paper-card front */
.postcard-preview{
  background:#f7f3ea!important;
  border:1px solid rgba(93,79,63,.18)!important;
  box-shadow:
    0 18px 40px rgba(47,55,68,.12),
    0 2px 10px rgba(47,55,68,.08),
    inset 0 0 0 1px rgba(255,255,255,.62)!important;
}
.postcard-preview::before{
  display:block!important;
  content:""!important;
  position:absolute!important;
  inset:0!important;
  z-index:0!important;
  pointer-events:none!important;
  opacity:1!important;
  background:
    linear-gradient(110deg,rgba(255,255,255,.34),rgba(255,255,255,0) 34%),
    radial-gradient(circle at 14% 16%,rgba(145,115,80,.045) 0 1px,transparent 1.2px) 0 0/18px 18px,
    radial-gradient(circle at 72% 64%,rgba(80,92,108,.035) 0 1px,transparent 1.2px) 0 0/22px 22px!important;
}
.postcard-preview::after{display:none!important}
.postcard-front{
  background:
    linear-gradient(135deg,rgba(255,252,245,.96),rgba(247,243,234,.97))!important;
  box-shadow:inset 0 0 0 10px rgba(255,255,255,.28)!important;
}
.postcard-front::before{
  content:"";
  position:absolute;
  inset:12px;
  border:1px solid rgba(109,91,69,.12);
  border-radius:calc(inherit - 12px);
  pointer-events:none;
}
.postcard-mark{
  color:#6c6258!important;
  opacity:.82!important;
}
.postcard-date{
  color:#746d65!important;
  opacity:.82!important;
}
.postcard-preview h3{
  color:#30465a!important;
  font-family:"Noto Serif TC","Noto Serif JP","Yu Mincho","Hiragino Mincho ProN",serif!important;
  font-weight:700!important;
}
.postcard-preview p{
  color:#5f6771!important;
}
.postcard-sign{
  color:#4f5862!important;
  opacity:.76!important;
}
.postcard-postmark{
  color:#53677c!important;
  border-color:#53677c!important;
}
.postcard-hanko{
  background:#a94a42!important;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.3),0 3px 8px rgba(95,45,40,.16)!important;
}

/* Desktop-specific composition */
body.desktop-device .postcard-preview{
  aspect-ratio:1.62/1!important;
  max-width:980px!important;
  margin:18px auto!important;
  border-radius:30px!important;
}
body.desktop-device .postcard-front{
  padding:34px 42px 72px 46px!important;
}
body.desktop-device .postcard-mark{
  top:30px!important;
  left:46px!important;
  font-size:12px!important;
  letter-spacing:.15em!important;
}
body.desktop-device .postcard-date{
  top:30px!important;
  right:38px!important;
  font-size:12px!important;
}
body.desktop-device .postcard-icon{
  width:72px!important;
  height:54px!important;
  font-size:2.45rem!important;
  margin:66px 0 12px 18px!important;
}
body.desktop-device .postcard-preview h3{
  max-width:66%!important;
  margin:6px 0 0 18px!important;
  font-size:clamp(22px,2.1vw,30px)!important;
  line-height:1.3!important;
  -webkit-line-clamp:2!important;
  max-height:calc(1.3em * 2.2)!important;
}
body.desktop-device .postcard-preview p{
  max-width:68%!important;
  margin:12px 0 0 18px!important;
  font-size:clamp(14px,1.2vw,18px)!important;
  line-height:1.56!important;
  -webkit-line-clamp:3!important;
  max-height:calc(1.56em * 3.2)!important;
}
body.desktop-device .postcard-sign{
  left:46px!important;
  bottom:24px!important;
  max-width:58%!important;
  font-size:10px!important;
}
body.desktop-device .postcard-postmark{
  right:94px!important;
  top:100px!important;
  transform:scale(1) rotate(-8deg)!important;
  opacity:.32!important;
}
body.desktop-device .postcard-jp-vertical{
  right:38px!important;
  top:112px!important;
  font-size:1.06rem!important;
}
body.desktop-device .postcard-hanko{
  right:32px!important;
  bottom:24px!important;
  width:50px!important;
  height:50px!important;
  font-size:26px!important;
}

/* Back-side fit — phone */
body.mobile-touch-device:not(.tablet-device) .postcard-back{
  padding:16px!important;
  background:#eee8df!important;
}
body.mobile-touch-device:not(.tablet-device) .postcard-back img{
  width:auto!important;
  height:auto!important;
  max-width:88%!important;
  max-height:88%!important;
  object-fit:contain!important;
  object-position:center!important;
  margin:auto!important;
  border-radius:14px!important;
  box-shadow:0 8px 20px rgba(55,45,34,.10)!important;
}

/* Back-side fit — tablet */
body.tablet-device .postcard-back{
  padding:20px!important;
  background:#eee8df!important;
}
body.tablet-device .postcard-back img{
  width:auto!important;
  height:auto!important;
  max-width:90%!important;
  max-height:90%!important;
  object-fit:contain!important;
  object-position:center!important;
  margin:auto!important;
  border-radius:16px!important;
  box-shadow:0 10px 24px rgba(55,45,34,.11)!important;
}

/* Back-side fit — desktop */
body.desktop-device .postcard-back{
  padding:24px 34px!important;
  background:#eee8df!important;
}
body.desktop-device .postcard-back img{
  width:auto!important;
  height:auto!important;
  max-width:92%!important;
  max-height:92%!important;
  object-fit:contain!important;
  object-position:center!important;
  margin:auto!important;
  border-radius:18px!important;
  box-shadow:0 12px 28px rgba(55,45,34,.12)!important;
}

/* Keep day badge clear of artwork */
.postcard-back-day{
  right:12px!important;
  bottom:10px!important;
  font-size:9px!important;
  background:rgba(43,39,34,.58)!important;
}

@media (max-width:430px){
  body.mobile-touch-device:not(.tablet-device) .postcard-back{padding:12px!important}
  body.mobile-touch-device:not(.tablet-device) .postcard-back img{max-width:86%!important;max-height:86%!important}
}

/* S077.40.7.6.26-R46 — desktop postcard visibility hardfix */
@media (min-width:901px){
  .postcard-card{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
  }
  .postcard-preview{
    display:block!important;
    position:relative!important;
    width:min(100%,980px)!important;
    max-width:980px!important;
    min-height:480px!important;
    height:auto!important;
    aspect-ratio:1.62/1!important;
    margin:18px auto!important;
    overflow:hidden!important;
    visibility:visible!important;
    opacity:1!important;
  }
  .postcard-face{
    position:absolute!important;
    inset:0!important;
    width:100%!important;
    height:100%!important;
    box-sizing:border-box!important;
  }
  .postcard-front{
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    justify-content:flex-start!important;
    opacity:1;
    visibility:visible!important;
  }
  .postcard-preview:not(.is-back) .postcard-front{
    transform:rotateY(0deg)!important;
    opacity:1!important;
    pointer-events:auto!important;
  }
  .postcard-preview:not(.is-back) .postcard-back{
    transform:rotateY(180deg)!important;
    opacity:0!important;
    pointer-events:none!important;
  }
  .postcard-preview.is-back .postcard-front{
    transform:rotateY(-180deg)!important;
    opacity:0!important;
    pointer-events:none!important;
  }
  .postcard-preview.is-back .postcard-back{
    transform:rotateY(0deg)!important;
    opacity:1!important;
    pointer-events:auto!important;
  }
}

/* S077.40.7.6.26-R47 — restore functional premium postcard themes */
.postcard-preview.theme-dawn{
  --pc-paper-1:#fffaf1;
  --pc-paper-2:#f4e6db;
  --pc-ink:#334b60;
  --pc-copy:#626d76;
  --pc-muted:#71675f;
  --pc-stamp:#9a665d;
  --pc-seal:#a94a42;
  background:linear-gradient(135deg,#f8efe4 0%,#eef2f5 100%)!important;
  color:var(--pc-ink)!important;
}
.postcard-preview.theme-garden{
  --pc-paper-1:#f7faee;
  --pc-paper-2:#e3ecd8;
  --pc-ink:#304c3d;
  --pc-copy:#5c6d61;
  --pc-muted:#697468;
  --pc-stamp:#718b72;
  --pc-seal:#8b5d4e;
  background:linear-gradient(135deg,#edf3e4 0%,#dfe9d8 100%)!important;
  color:var(--pc-ink)!important;
}
.postcard-preview.theme-night{
  --pc-paper-1:#283953;
  --pc-paper-2:#52657f;
  --pc-ink:#f2eee4;
  --pc-copy:#d8e0e8;
  --pc-muted:#c4ccd5;
  --pc-stamp:#d7c4a2;
  --pc-seal:#a9534b;
  background:linear-gradient(135deg,#23344f 0%,#586b86 100%)!important;
  color:var(--pc-ink)!important;
  border-color:rgba(219,226,235,.20)!important;
  box-shadow:0 20px 48px rgba(13,24,42,.24),inset 0 0 0 1px rgba(255,255,255,.12)!important;
}

.postcard-preview.theme-dawn .postcard-front,
.postcard-preview.theme-garden .postcard-front,
.postcard-preview.theme-night .postcard-front{
  background:linear-gradient(135deg,var(--pc-paper-1),var(--pc-paper-2))!important;
}
.postcard-preview.theme-night .postcard-front{
  box-shadow:inset 0 0 0 10px rgba(255,255,255,.055)!important;
}
.postcard-preview.theme-night .postcard-front::before{
  border-color:rgba(235,240,246,.15)!important;
}

.postcard-preview.theme-dawn::before{
  background:
    linear-gradient(110deg,rgba(255,255,255,.40),rgba(255,255,255,0) 34%),
    radial-gradient(circle at 14% 16%,rgba(157,111,88,.05) 0 1px,transparent 1.2px) 0 0/18px 18px,
    radial-gradient(circle at 72% 64%,rgba(85,102,120,.035) 0 1px,transparent 1.2px) 0 0/22px 22px!important;
}
.postcard-preview.theme-garden::before{
  background:
    linear-gradient(110deg,rgba(255,255,255,.32),rgba(255,255,255,0) 34%),
    radial-gradient(circle at 18% 20%,rgba(93,121,91,.055) 0 1px,transparent 1.2px) 0 0/19px 19px,
    radial-gradient(circle at 70% 68%,rgba(132,112,78,.03) 0 1px,transparent 1.2px) 0 0/23px 23px!important;
}
.postcard-preview.theme-night::before{
  background:
    linear-gradient(110deg,rgba(255,255,255,.08),rgba(255,255,255,0) 38%),
    radial-gradient(circle at 16% 18%,rgba(255,255,255,.06) 0 1px,transparent 1.2px) 0 0/20px 20px,
    radial-gradient(circle at 72% 64%,rgba(217,195,157,.045) 0 1px,transparent 1.2px) 0 0/24px 24px!important;
}

.postcard-preview.theme-dawn .postcard-mark,
.postcard-preview.theme-garden .postcard-mark,
.postcard-preview.theme-night .postcard-mark,
.postcard-preview.theme-dawn .postcard-date,
.postcard-preview.theme-garden .postcard-date,
.postcard-preview.theme-night .postcard-date{
  color:var(--pc-muted)!important;
}
.postcard-preview.theme-dawn h3,
.postcard-preview.theme-garden h3,
.postcard-preview.theme-night h3{
  color:var(--pc-ink)!important;
}
.postcard-preview.theme-dawn p,
.postcard-preview.theme-garden p,
.postcard-preview.theme-night p,
.postcard-preview.theme-dawn .postcard-sign,
.postcard-preview.theme-garden .postcard-sign,
.postcard-preview.theme-night .postcard-sign{
  color:var(--pc-copy)!important;
}
.postcard-preview.theme-dawn .postcard-postmark,
.postcard-preview.theme-garden .postcard-postmark,
.postcard-preview.theme-night .postcard-postmark{
  color:var(--pc-stamp)!important;
  border-color:var(--pc-stamp)!important;
}
.postcard-preview.theme-dawn .postcard-hanko,
.postcard-preview.theme-garden .postcard-hanko,
.postcard-preview.theme-night .postcard-hanko{
  background:var(--pc-seal)!important;
}
.postcard-preview.theme-night .postcard-icon{
  filter:drop-shadow(0 3px 8px rgba(0,0,0,.14));
}

/* Strong visible state for theme selector */
.postcard-themes button[aria-pressed="true"]{
  font-weight:800!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.45),0 4px 12px rgba(43,55,70,.08)!important;
}
.postcard-themes button[data-postcard-theme="dawn"][aria-pressed="true"]{
  background:linear-gradient(135deg,#f7e9dc,#edf1f5)!important;
  color:#4d5660!important;
}
.postcard-themes button[data-postcard-theme="garden"][aria-pressed="true"]{
  background:linear-gradient(135deg,#e6efdd,#d7e4d2)!important;
  color:#365140!important;
}
.postcard-themes button[data-postcard-theme="night"][aria-pressed="true"]{
  background:linear-gradient(135deg,#263852,#536782)!important;
  color:#f3eee4!important;
}

/* S077.40.7.6.26-R48 — desktop postcard ratio fix (avoid square card) */
@media (min-width:901px){
  .postcard-preview{
    width:100%!important;
    max-width:980px!important;
    min-height:0!important;
    height:auto!important;
    aspect-ratio:1.62/1!important;
  }
  .postcard-card .postcard-preview{
    min-height:0!important;
  }
}

/* S077.40.7.6.26-R49 — stable region-based postcard front layout */
.postcard-main-copy,
.postcard-side-decor{display:contents}

@media (min-width:901px){
  .postcard-preview{
    width:100%!important;
    max-width:980px!important;
    min-height:0!important;
    height:auto!important;
    aspect-ratio:1.62/1!important;
  }
  .postcard-front{
    display:block!important;
    position:absolute!important;
    inset:0!important;
    padding:0!important;
    overflow:hidden!important;
  }
  .postcard-main-copy{
    display:flex!important;
    position:absolute!important;
    left:6.5%!important;
    top:25%!important;
    width:60%!important;
    height:49%!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    justify-content:flex-start!important;
    gap:0!important;
  }
  .postcard-main-copy .postcard-icon{
    position:static!important;
    width:62px!important;
    height:46px!important;
    margin:0 0 14px 0!important;
    font-size:2.25rem!important;
  }
  .postcard-main-copy h3{
    position:static!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    font-size:clamp(24px,2.15vw,34px)!important;
    line-height:1.24!important;
    max-height:none!important;
    -webkit-line-clamp:unset!important;
  }
  .postcard-main-copy p{
    position:static!important;
    width:100%!important;
    max-width:92%!important;
    margin:12px 0 0 0!important;
    font-size:clamp(14px,1.18vw,18px)!important;
    line-height:1.58!important;
    max-height:none!important;
    -webkit-line-clamp:3!important;
  }
  .postcard-side-decor{
    display:block!important;
    position:absolute!important;
    right:4.8%!important;
    top:18.5%!important;
    width:23%!important;
    height:55%!important;
    pointer-events:none!important;
  }
  .postcard-side-decor .postcard-postmark{
    position:absolute!important;
    top:0!important;
    right:40px!important;
    margin:0!important;
    transform:scale(.92) rotate(-8deg)!important;
    transform-origin:top right!important;
  }
  .postcard-side-decor .postcard-jp-vertical{
    position:absolute!important;
    top:18px!important;
    right:0!important;
    margin:0!important;
    font-size:1.02rem!important;
  }
  .postcard-mark{
    top:5.6%!important;
    left:6.5%!important;
    font-size:11px!important;
  }
  .postcard-date{
    top:5.6%!important;
    right:5.2%!important;
    font-size:11px!important;
  }
  .postcard-sign{
    left:6.5%!important;
    bottom:5.6%!important;
    max-width:58%!important;
    font-size:9px!important;
  }
  .postcard-hanko{
    right:5%!important;
    bottom:4.8%!important;
    width:48px!important;
    height:48px!important;
    font-size:24px!important;
  }
}

/* S077.40.7.6.26-R50 — desktop front copy position fine-tune */
@media (min-width:901px){
  .postcard-main-copy{
    left:6.8%!important;
    top:18.5%!important;
    width:62%!important;
    height:43%!important;
  }
  .postcard-main-copy .postcard-icon{
    width:58px!important;
    height:44px!important;
    margin:0 0 10px 0!important;
    font-size:2.1rem!important;
  }
  .postcard-main-copy h3{
    max-width:88%!important;
    font-size:clamp(22px,2.0vw,31px)!important;
    line-height:1.22!important;
  }
  .postcard-main-copy p{
    max-width:90%!important;
    margin:10px 0 0 0!important;
    font-size:clamp(13px,1.08vw,17px)!important;
    line-height:1.52!important;
  }
  .postcard-sign{
    left:6.8%!important;
    bottom:4.2%!important;
    max-width:54%!important;
    font-size:8.5px!important;
  }
  .postcard-hanko{
    bottom:4.2%!important;
  }
}

/* S077.40.7.6.26-R51 — desktop front copy lift */
@media (min-width:901px){
  .postcard-main-copy{
    top:13.5%!important;
    height:40%!important;
  }
  .postcard-main-copy .postcard-icon{
    margin:0 0 8px 0!important;
  }
  .postcard-main-copy h3{
    margin-top:0!important;
  }
  .postcard-main-copy p{
    margin:8px 0 0 0!important;
  }
}
