:root { color-scheme:dark; font-family:system-ui,-apple-system,"Hiragino Kaku Gothic ProN",sans-serif; background:#111b29; color:#fff4e9; }
.oauth-notice { padding:12px 14px; border:1px solid #f0c478; border-radius:12px; color:#fff0cb; background:#513c1c; }
.oauth-notice[hidden] { display:none; }
.app [hidden] {display:none!important;}
.app.editing .choices button {min-height:64px;touch-action:manipulation;}
.app.editing .choices button:focus-visible {outline:3px solid #ed796b;outline-offset:2px;}
.app.editing {height:100vh;height:100dvh;min-height:0;overflow:hidden;display:flex;flex-direction:column;padding-top:max(10px,env(safe-area-inset-top));padding-bottom:max(8px,env(safe-area-inset-bottom));}
.app.editing header {flex:none;margin:0 0 7px;gap:10px;}
.app.editing header small {display:none;}
.app.editing h1 {font-size:clamp(16px,4vw,22px);}
.app.editing .steps {flex:none;margin-bottom:9px;}
.app.editing .steps button {padding:6px 2px;}
.app.editing .oauth-notice {flex:none;max-height:68px;overflow:auto;margin:2px 0 9px;font-size:12px;}
.app.editing .preview {position:relative;top:auto;flex:none;margin:0 auto;width:min(100%,480px,26dvh)!important;box-shadow:0 8px 24px #0009;}
.app.editing .preview[data-shape="landscape"] {width:min(100%,620px,55dvh)!important;}
.app.editing .preview[data-shape="square"] {width:min(100%,480px,34dvh)!important;}
.app.editing .panel:not([hidden]) {flex:1;min-height:0;max-height:none;display:flex;flex-direction:column;overflow:hidden;margin-top:10px;padding-bottom:0;}
.app.editing .panel-scroll {flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:0 2px 10px;}
.app.editing .panel .buttons {position:relative!important;bottom:auto!important;z-index:1;flex:none;margin:0 -18px!important;padding:11px 18px max(12px,env(safe-area-inset-bottom))!important;background:#1b2734;border-top:1px solid #59616e;}
.app.editing footer {display:none;}
.app.editing .covers button[data-id="auto"] {grid-column:1/-1;background:#503440;border-color:#f0907c;}
.app.editing .covers button[data-id="auto"] b {font-size:17px;}
.app.editing .extra-choices {border-top:1px solid #59616e;margin:12px 0;padding:10px 0;}
.app.editing .extra-choices summary {cursor:pointer;padding:8px 2px;color:#ed796b;font-size:13px;font-weight:700;}
.app.editing .extra-choices[open] summary {margin-bottom:10px;}
.app.editing #lookSummary,.app.editing #coverSummary {background:#152232;border:1px solid #68535b;border-radius:10px;color:#ffe6d7;padding:9px 12px;font-size:12px;margin:8px 0 12px;}
.app.editing #titleField small {display:block;margin-top:7px;color:#cbb7b2;line-height:1.5;}
.app.editing #registerMemberId {margin:12px 0 4px;min-height:44px;}
.app.editing #memberRegistrationStatus {margin:4px 0 14px;}
@media (max-height:600px) {.app.editing .preview {width:min(100%,480px,21dvh)!important}.app.editing .preview[data-shape="landscape"] {width:min(100%,620px,44dvh)!important}.app.editing .preview[data-shape="square"] {width:min(100%,480px,28dvh)!important}}
* {box-sizing:border-box} body {margin:0;background:radial-gradient(circle at 50% -10%,#48303b 0%,#243040 37%,#111b29 78%);min-height:100dvh} button,input,textarea {font:inherit} button,.button {border:1px solid #657381;border-radius:12px;padding:11px 16px;color:#fff;background:#263342;cursor:pointer;text-align:center} button:disabled {opacity:.55;cursor:wait} button.main {border-color:#ed796b;background:#ed796b;color:#151e2c;font-weight:800} .app {max-width:720px;margin:auto;padding:14px 16px calc(22px + env(safe-area-inset-bottom))} header {display:flex;align-items:center;gap:18px;margin:5px 0 14px} header>a {flex:none;color:#ffe0ce;font-size:12px} header small {font-size:10px;letter-spacing:.18em;color:#eab6a4} h1 {margin:2px 0;font-size:clamp(20px,5vw,30px)} h1 span {font-size:11px;color:#d5bdb4} h2 {font-size:19px;margin:0 0 9px} p {color:#d4c5bc;line-height:1.55;font-size:13px;margin:4px 0 14px} a {color:#ffad94}.steps {display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin-bottom:12px}.steps button {padding:9px 2px;border:1px solid #59616e;border-radius:9px;color:#a7b0bc;text-align:center;font-size:11px}.steps button.active {background:#ed796b;color:#151e2c;font-weight:800;border-color:#ed796b}.preview {position:relative;display:grid;place-items:center;width:min(100%,480px,46dvh);min-height:0;aspect-ratio:3/4;margin:auto;background:#0b1421;border-radius:17px;overflow:hidden;box-shadow:0 20px 65px #0009;touch-action:pan-y}.preview video,.preview canvas {width:100%;height:100%;object-fit:cover;display:block}.preview [hidden] {display:none} .preview #empty {padding:32px;text-align:center}.panel {background:#1b2734;padding:18px;margin-top:14px;border:1px solid #59616e;border-radius:17px}.panel[hidden] {display:none}.buttons {display:flex;flex-wrap:wrap;gap:8px;align-items:center}.buttons>* {flex:1;min-width:130px}.choices {display:grid;grid-template-columns:repeat(auto-fit,minmax(122px,1fr));gap:8px;margin:12px 0 18px}.choices button {padding:12px;text-align:left;min-height:64px}.choices button.selected {border:2px solid #ed796b;background:#65424a}.choices b,.choices small {display:block}.choices small {font-size:10px;color:#d4c5bc;margin-top:5px} label:not(.button) {display:block;font-size:13px;margin:14px 0} input:not([type=file]),textarea {display:block;width:100%;border:1px solid #718092;border-radius:9px;background:#0e1928;color:white;padding:11px;margin-top:6px} fieldset {border:1px solid #59616e;border-radius:10px;margin:16px 0} fieldset label {display:flex!important;gap:8px;align-items:center;margin:9px 0!important;word-break:break-word} fieldset input {width:auto!important;margin:0!important}.status {min-height:18px;color:#ffd9c8}#postResults a {display:block;margin:8px 0} footer {text-align:center;font-size:10px;color:#ad9c9e;margin:20px}

.app.editing .diary-fields {border:1px solid #a08179;border-radius:12px;background:#283442;padding:12px;margin:12px 0;}
.app.editing .diary-fields label {margin:9px 0;}
.app.editing #threadSummary {color:#ffddcc;}
.app.editing input:not([type=file]),.app.editing textarea {font-size:16px;line-height:1.45;}
.app.editing .steps [data-step="post"] {background:#3e3041;border-color:#f5a391;color:#ffe6d6;cursor:pointer;font-weight:700;min-width:0;padding:6px 1px;font-size:11px;}
.app.editing .steps [data-step="post"]:disabled {background:transparent;border-color:#59616e;color:#a7b0bc;cursor:default;opacity:1;}
.app.editing .steps [data-step="post"].active {background:#ed796b;border-color:#ed796b;color:#151e2c;}
.app.editing .preview[data-shape="landscape"] {width:min(100%,620px,43dvh)!important;}
@media (max-height:600px) {.app.editing .preview[data-shape="landscape"] {width:min(100%,620px,32dvh)!important}}

header {gap:8px;} header>div {min-width:0;} header .brand-mini {width:48px;height:48px;object-fit:contain;flex:none;}
header #brandHome {display:block;flex:none;border:0;background:transparent;padding:0;line-height:0;}
header #brandHome:focus-visible {outline:3px solid #ed796b;outline-offset:3px;}
.steps button {background:transparent;min-width:0;touch-action:manipulation;}
.steps button:disabled {opacity:.6;cursor:default;}
.steps button:focus-visible {outline:3px solid #ed796b;outline-offset:2px;}
.preview #empty {display:grid;justify-items:center;gap:5px;width:100%;} .preview #empty .brand-hero {display:block;width:min(85%,240px);max-height:29dvh;object-fit:contain;} .preview #empty p {margin:0;}
.app:not(.editing):not(.camera-active) .preview #empty {align-content:center;gap:14px;padding:16px 20px;text-align:center;}
.preview #empty .hero-tagline {font-size:clamp(17px,4.5vw,23px);font-weight:750;color:#fff0e6;}
.preview #empty .hero-actions {display:grid;gap:10px;width:100%;max-width:350px;}
.preview #empty .hero-actions button {width:100%;min-height:51px;font-size:16px;font-weight:750;touch-action:manipulation;}
.preview #empty .hero-secondary {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}
.preview #empty .hero-secondary button {min-width:0;min-height:69px;text-align:left;padding:8px 11px;}
.preview #empty .hero-secondary b,.preview #empty .hero-secondary small {display:block;}
.preview #empty .hero-secondary small {margin-top:3px;font-size:10px;font-weight:500;line-height:1.25;}
.preview #empty .hero-flow {font-size:11px;line-height:1.5;color:#cbb9b6;}
#shoot .shoot-guide {list-style:none;counter-reset:shoot;display:grid;gap:14px;padding:0;margin:18px 0;}
#shoot .shoot-guide li {counter-increment:shoot;position:relative;padding-left:34px;line-height:1.55;}
#shoot .shoot-guide li::before {content:counter(shoot);position:absolute;left:0;top:0;display:grid;place-items:center;width:25px;height:25px;border-radius:50%;background:#ed796b;color:#15202d;font-weight:800;}
#shoot .shoot-guide strong,#shoot .shoot-guide span {display:block;}
#shoot .shoot-guide span {font-size:12px;color:#d4c5bc;}
.app.editing header .brand-mini {width:38px;height:38px;}
@media(max-width:410px) {header .brand-mini {width:38px;height:38px;}header h1 {font-size:18px;}}

#accountList .account-row {background:#132333;border:1px solid #68535b;border-radius:10px;padding:9px 12px;margin:8px 0;}
#accountList .account-row label {margin:0!important;align-items:flex-start;} #accountList .account-actions {display:flex;gap:7px;margin:8px 0 0 28px;} #accountList .account-actions button {padding:5px 9px;font-size:12px;}
#connectPanel {margin-top:12px;}

.revision {display:block;font-size:11px;font-weight:600;color:#e8b4a2;letter-spacing:.04em;white-space:nowrap;}
.update-notice {display:flex;align-items:center;justify-content:space-between;gap:8px;border:1px solid #ed796b;border-radius:10px;background:#493841;padding:8px 10px;margin-bottom:9px;font-size:12px;color:#fff0e4;}
.update-notice button {min-width:84px;padding:7px 9px;background:#ed796b;color:#1c2230;font-weight:800;}
.app.editing .update-notice {flex:none;}

.revision-line {display:flex;align-items:center;gap:10px;flex-wrap:wrap;} .revision-line #checkVersion {border:0;background:none;padding:2px;color:#ffc4af;text-decoration:underline;font-size:11px;min-width:0;}
.variable-buttons {display:flex;flex-wrap:wrap;gap:8px;margin:8px 0;} .variable-buttons button {padding:8px 12px;font-size:12px;border-color:#ed796b;color:#ffe6d7;}
.app #postTemplateSelect {display:block;width:100%;margin-top:6px;padding:11px;border:1px solid #718092;border-radius:9px;background:#0e1928;color:white;font-size:16px;}
.template-actions {display:flex;gap:8px;margin:10px 0;} .template-actions button {flex:1;min-width:0;font-size:12px;}
.app.editing:has(.update-notice:not([hidden])) .preview {width:min(100%,480px,20dvh)!important;}
.app.editing:has(.update-notice:not([hidden])) .preview[data-shape="landscape"] {width:min(100%,620px,34dvh)!important;}
.app.editing:has(.update-notice:not([hidden])) .preview[data-shape="square"] {width:min(100%,480px,26dvh)!important;}

/* 撮影中は映像とシャッターに画面を譲る。撮影後は通常の編集画面へ戻す。 */
.app.camera-active {height:100vh;height:100dvh;max-width:none;min-height:0;display:flex;flex-direction:column;overflow:hidden;padding:env(safe-area-inset-top) env(safe-area-inset-right) max(8px,env(safe-area-inset-bottom)) env(safe-area-inset-left);background:#0b1421;}
.app.camera-active header,.app.camera-active .steps,.app.camera-active .update-notice,.app.camera-active .oauth-notice,.app.camera-active footer,.app.camera-active #shoot h2,.app.camera-active #shoot>p,.app.camera-active #shoot .shoot-guide,.app.camera-active #shoot .buttons>*:not(#snap) {display:none!important;}
.app.camera-active .preview {position:relative;display:block;flex:1 1 0;min-height:0;min-width:0;width:100%;height:auto;max-width:none;aspect-ratio:auto;margin:0;border-radius:0;box-shadow:none;}
.app.camera-active .preview video {position:absolute;inset:0;width:100%;height:100%;min-width:0;min-height:0;object-fit:cover;object-position:center;}
.camera-logo-overlay {display:none!important;}
.app.camera-active .camera-logo-overlay:not([hidden]) {display:block!important;position:absolute;top:calc(max(10px,env(safe-area-inset-top)) + 64px);right:16px;width:clamp(76px,20vw,112px);height:auto;max-height:100px;object-fit:contain;z-index:2;pointer-events:none;filter:drop-shadow(0 2px 3px #000b);}
.app.camera-active #shoot {flex:none;margin:0;padding:14px 0 18px;border:0;border-radius:0;background:#0b1421;}
.app.camera-active #shoot .buttons {display:flex;justify-content:center;align-items:center;}
.app.camera-active #snap {flex:none;min-width:0;width:78px;height:78px;padding:0;border:4px solid white;border-radius:50%;background:#182637;font-size:0;box-shadow:0 0 0 2px #182637;touch-action:manipulation;}
.app.camera-active #snap::after {content:"";display:block;width:58px;height:58px;margin:auto;border-radius:50%;background:white;}
.app.camera-active #snap:focus-visible {outline:3px solid #ed796b;outline-offset:5px;}
.app.camera-active #shoot .buttons>*:is(#cameraPick,#cameraSwitch) {display:block!important;flex:none;min-width:0;width:52px;height:52px;border-radius:50%;padding:0;font-size:25px;touch-action:manipulation;}
.app.camera-active #shoot .buttons>*:is(#cameraPick,#cameraSwitch)[hidden] {display:none!important;}
.app.camera-active #shoot .buttons {gap:clamp(20px,8vw,45px);}
.app.camera-active #shoot .extra-choices,.app.camera-active #cameraStatus {display:none!important;}
.app.camera-active .preview {touch-action:none;}
.camera-grid,.camera-level,.camera-focus,.camera-topbar,.camera-options {display:none;}
.app.camera-active .camera-grid {display:block;position:absolute;inset:0;pointer-events:none;background:linear-gradient(to right,transparent 33.25%,#fff7 33.4%,#fff7 33.6%,transparent 33.75%,transparent 66.25%,#fff7 66.4%,#fff7 66.6%,transparent 66.75%),linear-gradient(to bottom,transparent 33.25%,#fff7 33.4%,#fff7 33.6%,transparent 33.75%,transparent 66.25%,#fff7 66.4%,#fff7 66.6%,transparent 66.75%);}
.app.camera-active .camera-level {display:block;position:absolute;left:50%;top:50%;width:88px;height:20px;transform:translate(-50%,-50%);pointer-events:none;}
.camera-level span {display:block;width:88px;height:3px;margin-top:9px;border-radius:3px;background:#ffd06f;box-shadow:0 0 3px #000;}
.camera-level.level-ok span {background:#8cff9b;}
.app.camera-active .camera-focus {display:block;position:absolute;width:64px;height:64px;border:2px solid #ffdc87;border-radius:50%;transform:translate(-50%,-50%);box-shadow:0 0 5px #000;pointer-events:none;}
.app.camera-active .camera-topbar {display:flex;position:absolute;top:max(10px,env(safe-area-inset-top));left:12px;right:12px;justify-content:space-between;pointer-events:none;}
.camera-topbar button {pointer-events:auto;min-width:52px;min-height:44px;border-radius:25px;background:#142033d9;border-color:#ffffff8c;font-weight:700;}
.camera-topbar #cameraClose {font-size:25px;line-height:1;}
.app.camera-active .camera-options {display:block;position:absolute;top:calc(max(10px,env(safe-area-inset-top)) + 56px);right:12px;width:min(300px,calc(100% - 24px));max-height:calc(100% - 100px);overflow:auto;padding:10px 14px;border:1px solid #ffffff8c;border-radius:15px;background:#121f30ef;box-shadow:0 16px 35px #000a;z-index:3;}
.camera-options label {margin:7px 0!important;display:block;}.camera-options label[hidden],.app.camera-active .camera-options[hidden],.app.camera-active .camera-grid[hidden],.app.camera-active .camera-level[hidden],.app.camera-active .camera-focus[hidden],.app.camera-active .camera-topbar[hidden] {display:none!important;}
.camera-options label small {display:block;margin:4px 0 9px;color:#f8e7d2;font-size:11px;line-height:1.4;}
.camera-options output {float:right;}.camera-options select,.camera-options input[type=range] {width:100%;margin:3px 0 9px;}.camera-options .camera-check {display:flex;gap:9px;align-items:center;}.camera-options .camera-check input {width:auto!important;margin:0!important;}.camera-options button {width:100%;margin:6px 0;}
.app.camera-active .preview video {touch-action:none;}
.app.camera-active .camera-message {display:block;position:absolute;bottom:12px;left:50%;transform:translateX(-50%);max-width:90%;padding:5px 12px;border-radius:20px;background:#091a2ac9;color:white;font-size:12px;white-space:nowrap;pointer-events:none;}
.preview.cover-drag-enabled,.preview.cover-drag-enabled canvas {touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;}
#resetTitlePosition {align-self:flex-start;margin:0 0 10px;padding:7px 10px;font-size:12px;}
.nearby-list {display:grid;gap:7px;margin:10px 0;}
.nearby-list .nearby-place {display:block;width:100%;text-align:left;overflow-wrap:anywhere;}
.nearby-list .nearby-place.selected {border:2px solid #ed796b;background:#65424a;}
.location-actions {display:flex;flex-wrap:wrap;gap:7px;}
.location-actions button {flex:1 1 150px;}

/* 料理の色を引き立てる、落ち着いた赤・橙・黄のパレット。 */
:root {color-scheme:light;background:#e9d9c2;color:#422d25;}
body {background:linear-gradient(165deg,#e3c9a9 0%,#eee0c9 45%,#e8d4bb 100%);color:#422d25;}
button,.button {background:#fff2df;color:#683925;border-color:#b78d69;}
button.main {background:#b53d32;border-color:#a9362c;color:#fff9ed;}
button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible {outline:3px solid #ac562b;outline-offset:2px;}
header small {color:#874627;} h1 span {color:#804b34;}
p,.choices small,#shoot .shoot-guide span {color:#674e3c;}
a {color:#8d3f25;}
.steps button {background:#f8ead5;color:#74442d;border-color:#c6a781;}
.steps button.active {background:#b53d32;color:#fff9ed;border-color:#a9362c;}
.steps button:disabled,.app.editing .steps [data-step="post"]:disabled {color:#776456;background:#e9d9c5;border-color:#d1baa1;}
.preview {background:linear-gradient(155deg,#efc991 0%,#f2d7a7 52%,#dcae84 100%);box-shadow:0 12px 30px #60371e2a;}
.preview #empty .hero-tagline {color:#493024;}
.preview #empty .hero-flow {color:#63442f;}
.preview #empty .hero-actions button:not(.main) {background:#fff1d7;border-color:#a76e4a;color:#693621;}
.preview #empty .hero-capabilities {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;width:100%;max-width:350px;}
.preview #empty .hero-capabilities span {display:flex;align-items:center;justify-content:center;min-width:0;min-height:47px;padding:5px 7px;border:1px solid #abb3b5;border-radius:9px;background:#e9e4da;color:#62574d;font-size:clamp(10px,2.7vw,12px);font-weight:800;line-height:1.3;overflow-wrap:anywhere;}
.preview #empty #blueskyCapability[data-state="ready"] {border-color:#0e78bd;background:#1679bc;color:#fff;}
.preview #empty #bonkurazCapability[data-state="ready"] {border-color:#d6ae49;background:#082d50;color:#ffe19a;box-shadow:inset 3px 0 #d23e36;}
.preview #empty #blueskyCapability[data-state="checking"],.preview #empty #blueskyCapability[data-state="unavailable"] {border-color:#91b9d3;background:#e1f0fb;color:#215d88;}
.preview #empty #bonkurazCapability[data-state="checking"],.preview #empty #bonkurazCapability[data-state="unavailable"] {border-color:#c6aa68;background:#f5e9cc;color:#5d4424;}
.preview #empty .member-link {display:flex;align-items:center;justify-content:center;min-height:42px;padding:0 8px;border:1px solid #b69053;border-radius:9px;background:#f7e6c1;color:#593b20;font-size:11px;font-weight:800;touch-action:manipulation;}
.preview #empty .member-link[hidden] {display:none!important;}
.preview #empty .member-link:has(#memberMark:not([hidden])) {background:transparent;border-color:transparent;}
.preview #empty .member-link img {display:block;width:min(150px,100%);max-height:48px;object-fit:contain;}
.member-dialog {width:min(420px,calc(100% - 28px));max-height:calc(100dvh - 28px);overflow:auto;padding:20px;border:1px solid #bb8650;border-radius:16px;background:#faeedb;color:#422d25;box-shadow:0 20px 55px #29180f66;}
.member-dialog::backdrop {background:#26170ecc;}
.member-dialog h2 {margin:0 0 10px;}
.member-dialog p {color:#614c3b;}
.member-dialog label {display:block;font-weight:700;}
.member-dialog #homeMemberStatus {min-height:20px;margin:10px 0;color:#903827;}
.member-dialog .member-dialog-actions {display:flex;gap:8px;margin:12px 0;}
.member-dialog .member-dialog-actions button {flex:1;min-width:0;}
.member-dialog a {font-size:12px;}
.home-settings-dialog {color-scheme:light;}
.home-settings-dialog section {padding:12px 0;border-top:1px solid #d6b791;}
.home-settings-dialog h3 {margin:0 0 10px;font-size:16px;}
.home-settings-dialog .home-account-row {margin:8px 0;padding:9px;border:1px solid #c9aa81;border-radius:10px;background:#fff9ec;}
.home-settings-dialog .home-account-row strong {display:block;overflow-wrap:anywhere;}
.home-settings-dialog .home-account-row div {display:flex;gap:7px;margin-top:6px;}
.home-settings-dialog .home-account-row button {flex:1;min-width:0;padding:7px 4px;font-size:12px;}
.home-settings-dialog #homeBlueskyForm button,.home-settings-dialog #homeOpenMember {width:100%;margin-top:9px;}
.home-settings-dialog #homeSettingsClose {width:100%;margin-top:12px;}
.app:not(.editing):not(.camera-active) .preview:has(#empty:not([hidden])) {width:min(100%,480px);aspect-ratio:auto;min-height:0;overflow:visible;padding:18px 0;}
.app:not(.editing):not(.camera-active) .preview #empty {gap:10px;}
.preview #empty .brand-hero {max-height:19dvh;}
@media (max-height:760px) {
  .app:not(.editing):not(.camera-active) .preview #empty {gap:6px;padding:8px 14px;}
  .preview #empty .brand-hero {max-height:15dvh;}
  .preview #empty .hero-actions>button {min-height:42px;padding:8px;}
  .preview #empty .hero-flow {display:none;}
}
.panel {background:#faeedb;border-color:#cfad84;box-shadow:0 6px 22px #60371e1c;}
.choices button {background:#fff4e3;color:#543527;border-color:#c7a178;}
.choices button.selected,.nearby-list .nearby-place.selected {background:#f9d68b;color:#512e1e;border:2px solid #aa622f;}
.choices button.selected small,.nearby-list .nearby-place.selected small {color:#624631;}
input:not([type=file]),textarea,.app #postTemplateSelect {background:#fffaf1;color:#3e2b23;border-color:#bfa07e;}
input::placeholder,textarea::placeholder {color:#79685a;opacity:1;}
fieldset {border-color:#c7a981;}
.status,#threadSummary {color:#8d3828;}
footer {color:#735744;}
.oauth-notice {background:#fce7b9;border-color:#b88843;color:#633c18;}
.app.editing .panel .buttons {background:#faeedb;border-color:#cfad84;}
.app.editing .preview {box-shadow:0 8px 24px #60371e29;}
.app.editing .covers button[data-id="auto"] {background:#f8dfbc;border-color:#b53d32;}
.app.editing .extra-choices {border-color:#d0b18a;}
.app.editing .extra-choices summary {color:#a33e2c;}
.app.editing #lookSummary,.app.editing #coverSummary {background:#f5dfaf;border-color:#cda674;color:#56371e;}
.app.editing #titleField small {color:#695341;}
.app.editing .diary-fields {background:#f5e4c9;border-color:#c8a47a;}
.app.editing #threadSummary {color:#8d3828;}
.app.editing .steps [data-step="post"] {background:#f4dcc9;border-color:#bc7759;color:#713927;}
.app.editing .steps [data-step="post"].active {background:#b53d32;border-color:#a9362c;color:#fff9ed;}
#accountList .account-row {background:#fff3de;border-color:#d0ac83;}
.revision {color:#874627;}
.revision-line #checkVersion {color:#8d3f25;}
.variable-buttons button {background:#f6e2b8;border-color:#be8a4e;color:#6c3e22;}
#shoot .shoot-guide li::before {background:#bd7130;color:#fff;}
.app.camera-active {color:#fff9ed;background:#211916;}
.app.camera-active .preview,.app.camera-active #shoot {background:#211916;box-shadow:none;}
.app.camera-active #shoot .buttons>*:is(#cameraPick,#cameraSwitch),.app.camera-active .camera-options button {background:#4a3027;color:#fff;border-color:#bd9770;}
.app.camera-active .camera-options select {background:#4a3027;color:#fff;border-color:#bd9770;}
.app.camera-active #snap {background:#3c2820;box-shadow:0 0 0 2px #3c2820;}
.camera-topbar button {background:#3e2922df;border-color:#dfba87;color:#fff9ed;}
.app.camera-active .camera-options {background:#38251fef;border-color:#c49b6e;}
.app.camera-active .camera-message {background:#38251fdc;}
.camera-touch-exposure[hidden] {display:none!important;}
.app.camera-active .camera-touch-exposure {display:block;position:absolute;left:50%;width:min(260px,76%);transform:translateX(-50%);z-index:2;padding:9px 14px;border:1px solid #dfba87;border-radius:14px;background:#38251fbd;color:#fff9ed;font-size:13px;font-weight:700;backdrop-filter:blur(8px);touch-action:auto;}
.camera-touch-exposure output {float:right;}
.camera-touch-exposure input {display:block;width:100%;margin:8px 0 2px;accent-color:#edaa60;touch-action:auto;}
.update-notice {gap:10px;padding:11px 12px;border:1px solid #bb8546;border-radius:15px;background:linear-gradient(135deg,#fff0cd,#f3d69d);box-shadow:0 8px 20px #60371e26;color:#4d3423;}
.update-notice img {width:42px;height:42px;flex:none;object-fit:contain;}
.update-notice .update-copy {flex:1;min-width:0;}
.update-notice strong,.update-notice span {display:block;}
.update-notice strong {font-size:13px;line-height:1.3;}
.update-notice span {margin-top:4px;font-size:11px;color:#664a32;line-height:1.35;}
.update-notice #updateNow {flex:none;min-width:65px;min-height:42px;border:0;border-radius:9px;background:#b53d32;color:#fff9ed;font-weight:800;}
.update-notice #updateDismiss {flex:none;min-width:32px;padding:6px;background:transparent;border:0;color:#5c3a28;font-size:20px;}
.update-notice.update-available {cursor:pointer;touch-action:manipulation;}
.update-notice.update-available:active {background:#edcc93;}
.update-overlay:not([hidden]) {position:fixed;z-index:1000;inset:0;display:grid;place-items:center;padding:20px;background:#332015a8;}
.update-card {display:grid;justify-items:center;gap:12px;width:min(340px,100%);padding:30px 24px;border:1px solid #c6995d;border-radius:20px;background:#fff1da;color:#493024;text-align:center;box-shadow:0 20px 55px #33201577;}
.update-card strong {font-size:18px;}
.update-card span:last-child {font-size:13px;color:#674e3c;}
.update-spinner {width:32px;height:32px;border:3px solid #edcc93;border-top-color:#b53d32;border-radius:50%;animation:update-spin .8s linear infinite;}
@keyframes update-spin {to {transform:rotate(360deg);}}
.post-preview {margin:0 0 16px;padding:13px 14px;border:1px solid #d0aa72;border-radius:13px;background:#f5e4c9;}
.post-preview h3 {margin:0 0 5px;color:#643822;font-size:16px;}
.post-preview #threadSummary {margin:0 0 10px;font-size:12px;font-weight:700;}
.post-preview #threadPreview {display:grid;gap:9px;max-height:250px;overflow-y:auto;overscroll-behavior:contain;}
.post-preview #threadPreview article {padding:10px 12px;border:1px solid #d2b593;border-radius:9px;background:#fff8eb;}
.post-preview #threadPreview strong {display:block;margin-bottom:5px;color:#98512b;font-size:11px;}
.post-preview #threadPreview p {margin:0;color:#3e2b23;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere;}
.post-preview #threadPreview .post-preview-empty {padding:10px 12px;color:#705b48;}
.post-preview small {display:block;margin-top:8px;color:#705b48;line-height:1.45;}
.post-slot-panel {margin:10px 0 14px;padding:12px;border:1px solid #cba36f;border-radius:13px;background:#f8e8d0;}
.post-slot-head {display:flex;align-items:baseline;justify-content:space-between;gap:8px;color:#69391f;}
.post-slot-head small {font-size:11px;color:#755745;}
.post-slot-buttons {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:10px;}
.post-slot-buttons button {min-width:0;min-height:48px;border-color:#ae754d;background:#fff7e9;color:#68351f;font-weight:800;font-size:19px;}
.post-slot-buttons button.saved::after {content:'保存済み・呼び出す';display:block;font-size:10px;font-weight:600;}
.post-slot-buttons button:not(.saved)::after {content:'空き・保存先';display:block;font-size:10px;font-weight:600;}
.post-slot-buttons button[aria-pressed="true"] {border-color:#a9352b;background:#b63c30;color:#fff8ed;}
.post-slot-panel #postSlotStatus {margin:8px 0 0;color:#69391f;font-size:12px;}
.post-slot-actions {display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin:0 0 12px;}
.post-slot-actions button {min-width:0;min-height:44px;font-size:13px;}
.post-slot-actions #savePostSlot:not(:disabled) {border-color:#a9352b;background:#b63c30;color:#fff8ed;font-weight:800;}
.post-variable-tools {margin:-5px 0 12px;min-width:0;}
.post-variable-tools>small {display:block;margin:0 0 5px;color:#735744;}
.post-variable-tools .variable-buttons {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin:0;}
.post-variable-tools .variable-buttons button {min-width:0;min-height:38px;padding:5px 3px;font-size:11px;white-space:nowrap;}
.open-post-editor {display:grid;gap:4px;width:100%;margin:8px 0 14px;padding:14px;text-align:left;border:2px solid #b53d32;border-radius:14px;background:#fff8e9;color:#5b3022;}
.open-post-editor span {font-weight:800;}
.open-post-editor small {overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#735744;}
.post-editor-dialog {position:fixed;inset:0;width:min(720px,calc(100vw - 20px));height:calc(100dvh - 20px);max-height:none;margin:auto;padding:12px;border:1px solid #be916b;border-radius:18px;background:#faeedb;color:#493024;box-shadow:0 20px 70px #271509aa;overflow:hidden;}
.post-editor-dialog::backdrop {background:#251510d9;}
.post-editor-dialog[open] {display:grid;grid-template-rows:auto minmax(0,1fr) minmax(0,1fr);gap:9px;}
.post-editor-head {display:flex;justify-content:space-between;align-items:center;gap:8px;min-width:0;}
.post-editor-head h2 {margin:0;font-size:18px;}
.post-editor-head button {flex:none;min-height:44px;padding:6px 12px;background:#fff8e9;border-color:#b88c66;color:#5b3022;font-weight:800;}
.post-editor-review {min-height:0;overflow-y:auto;border:1px solid #cfad84;border-radius:12px;background:#fff8ed;padding:10px;overscroll-behavior:contain;}
.post-editor-review .post-preview {margin:0;padding:0;border:0;background:transparent;}
.post-editor-review #threadPreview {max-height:none;}
.post-editor-write {display:flex;flex-direction:column;min-height:0;gap:6px;}
.post-editor-write label {display:flex!important;flex-direction:column;flex:none;min-height:0;margin:0!important;font-size:13px;font-weight:700;}
.post-editor-write #postText {flex:none;height:170px;min-height:170px;max-height:170px;overflow-y:auto;box-sizing:border-box;width:100%;resize:none;margin:5px 0 0;padding:12px;font-size:16px;line-height:1.5;}
.post-editor-write .post-variable-tools {flex:none;margin:0;}
.post-editor-write .post-variable-tools .variable-buttons {grid-template-columns:repeat(4,minmax(0,1fr));}
@media(max-width:520px) {.post-editor-write .post-variable-tools .variable-buttons {grid-template-columns:repeat(2,minmax(0,1fr));}}
.post-editor-place {flex:none;min-height:42px;padding:6px 8px;border:1px solid #b6865b;background:#fff4e1;color:#6c3e22;font-size:12px;font-weight:800;}
.location-editor-dialog {position:fixed;inset:0;width:min(620px,calc(100vw - 20px));height:min(750px,calc(100dvh - 20px));max-height:none;margin:auto;padding:12px;border:1px solid #be916b;border-radius:18px;background:#faeedb;color:#493024;box-shadow:0 20px 70px #271509aa;overflow:hidden;}
.location-editor-dialog::backdrop {background:#251510d9;}
.location-editor-dialog[open] {display:flex;flex-direction:column;gap:10px;}
.location-editor-content {flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;}
.location-editor-content #locationPanel {border:0;margin:0;padding:0;}
.location-editor-content #locationPanel summary {display:none;}
.location-editor-content #locationPanel p {font-size:12px;line-height:1.5;}
.location-editor-content #locationPanel label {display:block;margin:12px 0;font-size:13px;}
.location-editor-content #locationPanel input {display:block;width:100%;max-width:100%;min-width:0;margin-top:5px;background:#fffaf1;color:#3e2b23;border-color:#bfa07e;}
.location-editor-content #locationPanel button {min-height:44px;background:#fff8e9;color:#5b3022;border-color:#b88c66;}
header #homeSettingsButton {flex:none;margin-left:auto;min-width:49px;min-height:45px;padding:5px 7px;border:1px solid #b68c69;background:#fff6e6;color:#683923;}
header #homeSettingsButton b,header #homeSettingsButton small {display:block;line-height:1.1;}
header #homeSettingsButton b {font-size:20px;}
header #homeSettingsButton small {font-size:9px;letter-spacing:0;color:#683923;}
.preview #empty .hero-secondary {grid-template-columns:minmax(0,1fr);}
.app.editing #homeSettingsButton {margin-left:auto;}
.home-settings-dialog #connectPanel {display:none!important;}
.home-settings-dialog #accounts {margin:12px 0;padding:10px;}
.home-settings-dialog #accounts legend {font-weight:800;}
.post-action-dialog,.alt-editor-dialog {position:fixed;inset:0;width:min(680px,calc(100vw - 20px));height:calc(100dvh - 20px);max-height:none;margin:auto;padding:12px;border:1px solid #be916b;border-radius:18px;background:#faeedb;color:#493024;box-shadow:0 20px 70px #271509aa;overflow:hidden;}
.post-action-dialog::backdrop,.alt-editor-dialog::backdrop {background:#251510d9;}
.post-action-dialog[open],.alt-editor-dialog[open] {display:flex;flex-direction:column;gap:9px;}
.post-action-content {flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;}
.post-action-content .panel-scroll {overflow:visible;padding:0;}
.post-action-content .post-preview {margin:10px 0;}
.post-action-content .buttons {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0;}
.post-action-content .buttons>* {min-width:0;}
.post-action-footer {flex:none;padding-bottom:env(safe-area-inset-bottom);}
.post-action-footer button {width:100%;min-height:52px;background:#b53d32;color:#fff9ed;font-weight:800;}
.alt-editor-dialog #altEditorContent {flex:1;overflow-y:auto;}
.alt-editor-dialog label {display:block;font-weight:800;}
.alt-editor-dialog #alt {display:block;width:100%;height:min(42dvh,340px);min-height:130px;max-width:100%;resize:vertical;margin-top:10px;}
.post-action-menu {display:flex;flex-direction:column;gap:10px;flex:1;min-height:0;width:100%;padding:14px 10px;}
.post-action-menu h2 {margin:0;font-size:18px;}
.post-action-menu p {margin:0 0 4px;font-size:12px;}
.post-action-menu button {display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:5px;min-height:76px;width:100%;padding:12px;border:1px solid #b7835a;background:#fff7e7;color:#59351f;font-size:16px;font-weight:800;text-align:left;}
.post-action-menu button:first-of-type {background:#b53d32;border-color:#a1362d;color:#fff9ed;}
.post-action-menu button small {font-size:11px;font-weight:500;color:inherit;}
.app.editing:has(#post:not([hidden])) > #editReview,.app.editing:has(#post:not([hidden])) > #templateRail {display:none!important;}
.app.editing:has(#post:not([hidden])) > #post:not([hidden]) {grid-column:2;grid-row:5!important;align-self:stretch;min-width:0;min-height:0;width:100%;margin:0;padding:0;overflow-y:auto;}
.app.editing:has(#post:not([hidden])) > .preview {grid-column:1;grid-row:5!important;align-self:center;justify-self:center;max-height:100%;width:100%!important;}
.app.editing:has(#post:not([hidden])) {grid-template-rows:auto auto auto auto minmax(0,1fr)!important;}
.preview #empty .hero-actions #start {
  display:grid;place-items:center;min-height:102px;height:102px;
  border:2px solid #94312b;border-radius:17px;
  background-image:url('/assets/gourmet-cutlery.svg'),linear-gradient(125deg,#b03830 0%,#cf5037 55%,#a6302d 100%);
  background-size:100% 100%,cover;background-position:center;
  color:#fffaf0;font-size:clamp(18px,5vw,23px);font-weight:850;
  text-shadow:0 2px 6px #63251a;box-shadow:0 7px 18px #69362338;
}
.preview #empty .hero-actions #start:active {filter:brightness(.92);}

/* 横向き・広い画面: 左に完成写真と投稿確認、右に入力と操作を固定する。 */
@media (min-width:900px), (orientation:landscape) and (min-width:600px) and (max-height:650px) {
  .app.editing:not(.camera-active) {
    display:grid;grid-template-columns:minmax(0,58fr) minmax(0,42fr);
    grid-template-rows:auto auto auto auto minmax(0,1fr);
    column-gap:14px;max-width:none;width:100%;height:100dvh;
    padding: max(6px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
  }
  .app.editing:not(.camera-active)>header {grid-column:1/-1;grid-row:1;min-height:0;}
  .app.editing:not(.camera-active)>.update-notice {grid-column:1/-1;grid-row:2;}
  .app.editing:not(.camera-active)>.steps {grid-column:1/-1;grid-row:3;}
  .app.editing:not(.camera-active)>.oauth-notice {grid-column:1/-1;grid-row:4;}
  .app.editing:not(.camera-active)>.preview {
    grid-column:1;grid-row:5;align-self:center;justify-self:center;
    width:min(100%,49dvh)!important;max-height:100%;margin:auto;
  }
  .app.editing:not(.camera-active)>.preview[data-shape="landscape"] {width:min(100%,88dvh)!important;}
  .app.editing:not(.camera-active)>.preview[data-shape="square"] {width:min(100%,66dvh)!important;}
  .app.editing:not(.camera-active)>#filter:not([hidden]),
  .app.editing:not(.camera-active)>#frame:not([hidden]),
  .app.editing:not(.camera-active)>#post:not([hidden]) {
    grid-column:2;grid-row:5;align-self:stretch;width:100%;min-height:0;
    margin:0;overflow:hidden;
  }
  .app.editing:not(.camera-active)>#editReview:not([hidden]) {
    grid-column:1;grid-row:5;align-self:end;justify-self:stretch;z-index:1;
    height:38%;min-height:0;overflow-y:auto;overscroll-behavior:contain;
    padding:6px;border:1px solid #cfad84;border-radius:12px;background:#faeedb;
  }
  .app.editing:not(.camera-active):has(#post:not([hidden]))>.preview {align-self:start;width:min(100%,32dvh)!important;max-height:58%;}
  .app.editing:not(.camera-active):has(#post:not([hidden]))>.preview[data-shape="landscape"] {width:min(100%,60dvh)!important;}
  .app.editing:not(.camera-active):has(#post:not([hidden]))>.preview[data-shape="square"] {width:min(100%,42dvh)!important;}
  .app.editing:not(.camera-active)>.edit-review .post-preview {margin:0;padding:8px;}
.app.editing:not(.camera-active)>.edit-review #threadPreview {max-height:none;}
}

/* 写真の候補・保存文・店舗候補は、同じ横スライド操作で選ぶ。 */
.app.editing .choices,
.app.editing .nearby-list,
.app.editing .post-slot-buttons {
  display:grid;grid-auto-flow:column;grid-template-columns:none;
  grid-auto-columns:clamp(185px,64%,250px);
  gap:9px;min-width:0;overflow-x:auto;overflow-y:hidden;
  scroll-snap-type:x proximity;scroll-padding-inline:4px;
  overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;
  padding:3px 3px 12px;
  scrollbar-width:thin;scrollbar-color:#bb7e53 transparent;
}
.app.editing .choices>button,
.app.editing .nearby-list>button,
.app.editing .post-slot-buttons>button {scroll-snap-align:start;min-width:0;}
.app.editing .covers button[data-id="auto"] {grid-column:auto;}
.app.editing .nearby-list {grid-auto-columns:clamp(200px,70%,285px);}
.app.editing .post-slot-buttons {grid-auto-columns:clamp(110px,55%,180px);}
.app.editing .nearby-list .nearby-place {width:100%;min-height:64px;}

.selected-scene {display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;align-items:center;column-gap:6px;row-gap:3px;width:100%;min-height:70px;margin:8px 0 16px;padding:12px 16px;border:2px solid #aa622f;background:#f9d68b;color:#512e1e;text-align:left;}
.enhance-choice {margin:18px 0 6px;padding:14px;border:1px solid #c9966b;border-radius:14px;background:#fff4e3;}
.enhance-choice h3 {margin:0 0 6px;font-size:15px;color:#883c28;}
.enhance-choice p {margin:0 0 10px;}
.enhance-choice #enhancePhoto {width:100%;min-height:54px;background:#b53d32;color:#fff9ed;}
.enhance-explanation {margin-top:9px;border-top:1px solid #d0ad87;padding-top:7px;}
.enhance-explanation summary {cursor:pointer;color:#8c4530;font-size:12px;font-weight:700;}
.enhance-explanation p {margin:8px 0 0;line-height:1.5;}
.selected-scene small,.selected-scene strong {display:block;}
.selected-scene small {grid-column:1/-1;grid-row:1;font-size:11px;white-space:nowrap;}
.selected-scene strong {grid-column:1;grid-row:2;min-width:0;font-size:18px;line-height:1.25;overflow-wrap:anywhere;}
.selected-scene-action {grid-column:2;grid-row:2;justify-self:end;white-space:nowrap;border-bottom:1px solid #a2623f;color:#873b25;font-size:12px;font-weight:700;}
.scene-dialog {position:fixed;inset:0;width:min(480px,calc(100% - 24px));height:min(730px,calc(100dvh - 32px));max-height:none;margin:auto;padding:18px;border:1px solid #b98759;border-radius:20px;background:#faeedb;color:#422d25;box-shadow:0 20px 65px #29180f77;overflow:hidden;}
.scene-dialog::backdrop {background:#26170ed9;}
.scene-dialog[open] {display:flex;flex-direction:column;}
.scene-dialog-head {display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;}
.scene-dialog-head h2 {margin:0;font-size:clamp(13px,3.5vw,19px);line-height:1.25;}
.scene-dialog-head button {flex:none;min-width:62px;min-height:44px;padding:6px 8px;font-size:13px;font-weight:700;}
.scene-dialog p {flex:none;margin:6px 0 12px;color:#674e3c;}
.scene-options {display:grid;grid-template-columns:minmax(0,1fr);grid-auto-rows:max-content;align-content:start;gap:8px;flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:2px 2px max(18px,env(safe-area-inset-bottom));}
.scene-options button {display:block;width:100%;min-height:66px;padding:10px 16px;text-align:left;border:1px solid #c7a178;background:#fff4e3;color:#543527;touch-action:manipulation;}
.scene-options button b,.scene-options button small {display:block;}
.scene-options button small {margin-top:3px;font-size:12px;color:#674e3c;}
.scene-options button.selected {border:2px solid #aa622f;background:#f9d68b;color:#512e1e;}
.scene-options button:focus-visible,.selected-scene:focus-visible {outline:3px solid #b53d32;outline-offset:2px;}
.app.editing #templateRail {min-width:0;min-height:0;overflow-y:auto;overscroll-behavior:contain;border:1px solid #cda57e;border-radius:14px;background:#faeedb;}
.app.editing #templateRail .post-slot-panel {margin:0;padding:8px;border:0;background:transparent;}
.app.editing #templateRail .post-slot-head {display:block;}
.app.editing #templateRail .post-slot-head small {display:block;}
.app.editing #templateRail .post-slot-buttons {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-flow:row;grid-auto-columns:auto;gap:4px;overflow:visible;padding:0;scroll-snap-type:none;}
.app.editing #templateRail .post-slot-buttons button {min-width:0;min-height:45px;padding:4px 2px;font-size:17px;}
.app.editing #designRail,.app.editing #captionRail {min-width:0;min-height:0;overflow-y:auto;overscroll-behavior:contain;border:1px solid #cda57e;border-radius:14px;background:#faeedb;color:#493024;padding:10px;}
.app.editing #designRail h2,.app.editing #captionRail h3 {margin:0 0 8px;font-size:16px;}
.app.editing #designRail p,.app.editing #captionRail p {font-size:12px;}
.app.editing #designRail .choices {grid-auto-columns:clamp(115px,75%,200px);}
.app.editing #captionRail input,.app.editing #captionRail textarea {max-width:100%;}
.app.editing #captionRail .diary-fields,.app.editing #captionRail .diary-fields label {min-width:0;max-width:100%;}
.app.editing #captionRail #diaryDate {box-sizing:border-box;display:block;width:100%;min-width:0;max-width:100%;}
.app.editing #enhanceRail,.app.editing #sceneRail,.app.editing #textureRail {min-width:0;min-height:0;overflow-y:auto;overscroll-behavior:contain;border:1px solid #cda57e;border-radius:14px;background:#faeedb;color:#493024;padding:9px;}
.app.editing #enhanceRail .enhance-choice {margin:0;padding:0;border:0;background:transparent;}
.app.editing #sceneRail h3,.app.editing #textureRail h3 {margin:0 0 6px;font-size:15px;}
.app.editing #sceneRail p {margin-bottom:7px;font-size:11px;}
.app.editing #sceneRail #sceneGroup > p {display:none;}
.app.editing #sceneRail .selected-scene,.app.editing #textureRail .selected-scene {margin:0;padding:8px;min-height:62px;}
.app.editing:has(#filter:not([hidden])) .scene-dialog {position:fixed;inset:0 auto auto 0;max-width:none;max-height:none;margin:0;border-radius:14px 14px 0 0;}
.app.editing:has(#filter:not([hidden])) .scene-dialog::backdrop {background:#26170e1c;}
.app.editing:has(#frame:not([hidden])) .scene-dialog {position:fixed;inset:0 auto auto 0;max-width:none;max-height:none;margin:0;border-radius:14px 14px 0 0;}
.app.editing:has(#frame:not([hidden])) .scene-dialog::backdrop {background:#26170e1c;}
.app.editing .preview[data-shape="portrait-tall"] {width:min(100%,24dvh)!important;}
.app.editing #designRail .selected-scene {margin:12px 0;min-height:62px;padding:9px;}
.app.editing #designRail #coverSummary {margin:8px 0;}
.app.editing #frame .panel-scroll {padding-bottom:12px;}
.app.editing #frame .selected-scene {padding:9px;min-height:62px;}
.app.editing #frame h3 {margin:8px 0 12px;font-size:clamp(15px,4vw,19px);line-height:1.35;}
@media (min-width:900px), (orientation:landscape) and (min-width:600px) and (max-height:650px) {
  .app.editing:not(.camera-active):has(#filter:not([hidden])) {grid-template-rows:auto auto auto auto minmax(0,42fr) minmax(0,58fr) auto;}
  .app.editing:not(.camera-active):has(#filter:not([hidden])) > #enhanceRail:not([hidden]) {grid-column:2;grid-row:5;align-self:stretch;}
  .app.editing:not(.camera-active):has(#filter:not([hidden])) > .preview {grid-column:1;grid-row:5;align-self:center;justify-self:center;max-height:100%;}
  .app.editing:not(.camera-active):has(#filter:not([hidden])):not(:has(#enhanceRail:not([hidden]))) > .preview {grid-column:1;grid-row:5;width:100%!important;}
  .app.editing:not(.camera-active):has(#filter:not([hidden])) > #sceneRail:not([hidden]) {grid-column:1;grid-row:6;align-self:stretch;}
  .app.editing:not(.camera-active):has(#filter:not([hidden])) > #textureRail:not([hidden]) {grid-column:2;grid-row:6;align-self:stretch;}
  .app.editing:not(.camera-active):has(#filter:not([hidden])) > #filter:not([hidden]) {grid-column:1/-1;grid-row:7;min-height:0;padding:0;margin:0;}
  .app.editing:not(.camera-active):has(#filter:not([hidden])) > #filter .panel-scroll {display:none;}
  .app.editing:not(.camera-active):has(#filter:not([hidden])) > #filter .buttons {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}
  .app.editing:not(.camera-active):has(#frame:not([hidden])) {grid-template-rows:auto auto auto auto minmax(0,55fr) minmax(0,45fr) auto;}
  .app.editing:not(.camera-active):has(#frame:not([hidden])) > #designRail:not([hidden]) {grid-column:2;grid-row:5;align-self:stretch;}
  .app.editing:not(.camera-active):has(#frame:not([hidden])) > .preview {grid-column:1;grid-row:5;align-self:center;justify-self:center;max-height:100%;}
  .app.editing:not(.camera-active):has(#frame:not([hidden])) > #captionRail:not([hidden]) {grid-column:1;grid-row:6;align-self:stretch;}
  .app.editing:not(.camera-active):has(#frame:not([hidden])) > #frame:not([hidden]) {grid-column:2;grid-row:6;}
  .app.editing:not(.camera-active):has(#post:not([hidden])) {grid-template-rows:auto auto auto auto minmax(0,42fr) minmax(0,58fr);}
  .app.editing:not(.camera-active):has(#post:not([hidden])) > .preview {grid-column:1;grid-row:5;align-self:center;justify-self:center;max-height:100%;}
  .app.editing:not(.camera-active):has(#post:not([hidden])) > #templateRail:not([hidden]) {grid-column:2;grid-row:5;align-self:stretch;}
  .app.editing:not(.camera-active):has(#post:not([hidden])) > #editReview:not([hidden]) {grid-column:1;grid-row:6;align-self:stretch;height:100%;}
  .app.editing:not(.camera-active):has(#post:not([hidden])) > #post:not([hidden]) {grid-column:2;grid-row:6;}
}
@media (orientation:portrait) and (max-width:899px) {
  .app.editing:has(:is(#filter,#frame,#post):not([hidden])) {display:grid;grid-template-columns:minmax(0,54fr) minmax(0,46fr);grid-template-rows:auto auto auto auto minmax(0,1fr);column-gap:8px;}
  .app.editing:has(:is(#filter,#frame,#post):not([hidden])) > header {grid-column:1/-1;grid-row:1;}
  .app.editing:has(:is(#filter,#frame,#post):not([hidden])) > .update-notice {grid-column:1/-1;grid-row:2;}
  .app.editing:has(:is(#filter,#frame,#post):not([hidden])) > .steps {grid-column:1/-1;grid-row:3;}
  .app.editing:has(:is(#filter,#frame,#post):not([hidden])) > .oauth-notice {grid-column:1/-1;grid-row:4;}
  .app.editing:has(:is(#filter,#frame,#post):not([hidden])) > .preview {grid-column:1;grid-row:5;align-self:center;justify-self:center;width:100%!important;max-width:100%;height:auto;max-height:100%;margin:0;}
  .app.editing:has(:is(#filter,#frame,#post):not([hidden])) > #filter:not([hidden]) {grid-column:2;grid-row:5;align-self:stretch;width:100%;min-height:0;margin:0;padding:10px 9px 0;}
  .app.editing:has(#post:not([hidden])) > #post:not([hidden]) {grid-column:2;grid-row:5;align-self:stretch;width:100%;min-height:0;margin:0;padding:10px 9px 0;}
  .app.editing:has(#post:not([hidden])) > .preview {align-self:start;width:100%!important;max-height:52%;}
  .app.editing:has(#post:not([hidden])) > #editReview:not([hidden]) {grid-column:1;grid-row:5;align-self:end;width:100%;height:45%;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:4px;border:1px solid #cfad84;border-radius:12px;background:#faeedb;}
  .app.editing #editReview .post-preview {margin:0;padding:5px;}
  .app.editing #editReview #threadPreview {max-height:none;}
  .app.editing #post h2 {font-size:15px;}
  .app.editing #post p,.app.editing #post label,.app.editing #post small {font-size:11px;}
  .app.editing #post .post-slot-panel,.app.editing #post .post-preview {padding:7px;}
  .app.editing #post .post-slot-actions {grid-template-columns:1fr;}
  .app.editing #post .post-slot-actions button {min-width:0;font-size:11px;}
  .app.editing #post .buttons {display:grid;grid-template-columns:1fr;gap:5px;margin:0 -9px!important;padding:7px 8px max(8px,env(safe-area-inset-bottom))!important;}
  .app.editing #post .buttons button {min-width:0;min-height:43px;padding:5px 2px;font-size:12px;}
  .app.editing:has(#post:not([hidden])) {grid-template-rows:auto auto auto auto minmax(0,42fr) minmax(0,58fr);}
  .app.editing:has(#post:not([hidden])) > #templateRail:not([hidden]) {grid-column:2;grid-row:5;align-self:stretch;width:100%;}
  .app.editing:has(#post:not([hidden])) > .preview {grid-column:1;grid-row:5;align-self:center;justify-self:center;width:100%!important;max-height:100%;}
  .app.editing:has(#post:not([hidden])) > #editReview:not([hidden]) {grid-column:1;grid-row:6;align-self:stretch;height:100%;}
  .app.editing:has(#post:not([hidden])) > #post:not([hidden]) {grid-column:2;grid-row:6;}
  .app.editing:has(#frame:not([hidden])) > #frame:not([hidden]) {grid-column:2;grid-row:5;align-self:stretch;width:100%;min-height:0;margin:0;padding:10px 9px 0;}
  .app.editing #frame h2 {font-size:15px;}
  .app.editing #frame p,.app.editing #frame label,.app.editing #frame small {font-size:11px;}
  .app.editing #frame .choices {grid-auto-columns:minmax(115px,90%);}
  .app.editing #frame .choices button {min-width:0;padding:8px;}
  .app.editing #frame .buttons {display:grid;grid-template-columns:1fr;gap:5px;margin:0 -9px!important;padding:7px 8px max(8px,env(safe-area-inset-bottom))!important;}
  .app.editing #frame .buttons button {min-width:0;min-height:43px;padding:5px 2px;font-size:12px;}
  .app.editing:has(#frame:not([hidden])) {grid-template-rows:auto auto auto auto minmax(0,55fr) minmax(0,45fr) auto;}
  .app.editing:has(#frame:not([hidden])) > #designRail:not([hidden]) {grid-column:2;grid-row:5;align-self:stretch;width:100%;}
  .app.editing:has(#frame:not([hidden])) > .preview {grid-column:1;grid-row:5;align-self:center;justify-self:center;width:100%!important;max-height:100%;}
  .app.editing:has(#frame:not([hidden])) > #captionRail:not([hidden]) {grid-column:1;grid-row:6;align-self:stretch;width:100%;}
  .app.editing:has(#frame:not([hidden])) > #frame:not([hidden]) {grid-column:2;grid-row:6;}
  .app.editing #designRail,.app.editing #captionRail {padding:7px;}
  .app.editing #designRail h2,.app.editing #captionRail h3 {font-size:14px;}
  .app.editing #designRail .choices {grid-auto-columns:minmax(115px,90%);}
  .app.editing #designRail .choices button {min-width:0;padding:8px;}
  .app.editing #captionRail label,.app.editing #captionRail p,.app.editing #captionRail small {font-size:11px;}
  .app.editing #filter h2 {font-size:15px;}
  .app.editing #filter h3 {margin:12px 0 6px;font-size:14px;}
  .app.editing #filter p {font-size:11px;}
  .app.editing #filter .selected-scene {min-height:56px;padding:8px;gap:4px;font-size:11px;}
  .app.editing #filter .selected-scene strong {font-size:14px;}
  .app.editing #filter .enhance-choice {padding:8px;}
  .app.editing #filter .buttons {display:grid;grid-template-columns:1fr;gap:5px;margin:0 -9px!important;padding:7px 8px max(8px,env(safe-area-inset-bottom))!important;}
  .app.editing #filter .buttons button {min-width:0;min-height:43px;padding:5px 2px;font-size:12px;}
  .app.editing:has(#filter:not([hidden])) {grid-template-rows:auto auto auto auto minmax(0,42fr) minmax(0,58fr) auto;}
  .app.editing:has(#filter:not([hidden])) > #enhanceRail:not([hidden]) {grid-column:2;grid-row:5;align-self:stretch;width:100%;}
  .app.editing:has(#filter:not([hidden])) > .preview {grid-column:1;grid-row:5;align-self:center;justify-self:center;width:100%!important;max-height:100%;}
  .app.editing:has(#filter:not([hidden])):not(:has(#enhanceRail:not([hidden]))) > .preview {grid-column:1;grid-row:5;width:100%!important;}
  .app.editing:has(#filter:not([hidden])) > #sceneRail:not([hidden]) {grid-column:1;grid-row:6;align-self:stretch;width:100%;}
  .app.editing:has(#filter:not([hidden])) > #textureRail:not([hidden]) {grid-column:2;grid-row:6;align-self:stretch;width:100%;}
  .app.editing:has(#filter:not([hidden])) > #filter:not([hidden]) {grid-column:1/-1;grid-row:7;align-self:end;width:100%;min-height:0;margin:0;padding:0;}
  .app.editing:has(#filter:not([hidden])) > #filter .panel-scroll {display:none;}
  .app.editing:has(#filter:not([hidden])) > #filter .buttons {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin:0!important;padding:7px 8px max(8px,env(safe-area-inset-bottom))!important;}
  .app.editing #enhanceRail,.app.editing #sceneRail,.app.editing #textureRail {padding:7px;}
  .app.editing #enhanceRail h3 {font-size:13px;}
  .app.editing #enhanceRail p,.app.editing #enhanceRail label {font-size:11px;}
  .app.editing #sceneRail h3,.app.editing #textureRail h3 {font-size:14px;}
  .app.editing #sceneRail .selected-scene,.app.editing #textureRail .selected-scene {min-height:54px;gap:4px;}
  .app.editing #sceneRail .selected-scene strong,.app.editing #textureRail .selected-scene strong {font-size:13px;}
  .app.editing .scene-dialog {position:fixed;inset:0 auto auto 0;max-width:none;max-height:none;margin:0;padding:10px 8px max(12px,env(safe-area-inset-bottom));border-radius:14px 14px 0 0;}
  .app.editing .scene-dialog p {font-size:11px;}
  .app.editing .scene-options button {min-height:58px;padding:6px 8px;}
  .app.editing .scene-options button b {font-size:13px;}
  .app.editing .scene-options button small {font-size:10px;}
  .app.editing .scene-dialog::backdrop {background:#26170e1c;}
}
/* 次の操作は各編集欄から独立させ、常に画面の最下段に置く。 */
.flow-next {display:none;}
.app.editing .flow-next:not([hidden]) {display:flex;flex:none;padding:7px 0 max(4px,env(safe-area-inset-bottom));background:#f5e5cb;z-index:2;}
.app.editing .flow-next button:not([hidden]) {width:100%;min-height:48px;border-radius:12px;font-size:16px;font-weight:800;}
.enhance-notice:not([hidden]) {position:fixed;inset:0;z-index:1100;display:grid;place-items:center;padding:24px;background:#352219b8;}
.enhance-notice-card {display:grid;justify-items:center;gap:14px;width:min(340px,100%);padding:34px 24px;border:1px solid #c99763;border-radius:20px;background:#fff0d8;color:#503021;text-align:center;box-shadow:0 22px 60px #24130d80;}
.enhance-notice-card strong {font-size:clamp(22px,6vw,28px);}
.enhance-notice-card small {font-size:14px;color:#6e4933;}
.enhance-notice-spinner {width:42px;height:42px;border:4px solid #e9cfac;border-top-color:#b03830;border-radius:50%;animation:update-spin .8s linear infinite;}
.enhance-notice.finished .enhance-notice-spinner {animation:none;border:0;border-radius:50%;background:#b03830;color:white;display:grid;place-items:center;}
.enhance-notice.finished .enhance-notice-spinner::after {content:'✓';font-size:28px;line-height:1;}
@media (min-width:900px), (orientation:landscape) and (min-width:600px) and (max-height:650px) {
  .app.editing:not(.camera-active):has(#filter:not([hidden])) {grid-template-rows:auto auto auto auto minmax(0,42fr) minmax(0,58fr) auto auto;}
  .app.editing:not(.camera-active):has(#frame:not([hidden])) {grid-template-rows:auto auto auto auto minmax(0,55fr) minmax(0,45fr) auto;}
  .app.editing:not(.camera-active):has(#post:not([hidden])) {grid-template-rows:auto auto auto auto minmax(0,42fr) minmax(0,58fr) auto;}
  .app.editing:has(#filter:not([hidden])) > .flow-next {grid-row:8;}
  .app.editing:has(#frame:not([hidden])) > .flow-next,
  .app.editing:has(#post:not([hidden])) > .flow-next {grid-row:7;}
  .app.editing .flow-next {grid-column:1/-1;}
}
@media (orientation:portrait) and (max-width:899px) {
  .app.editing:has(#filter:not([hidden])) {grid-template-rows:auto auto auto auto minmax(0,42fr) minmax(0,58fr) auto auto;}
  .app.editing:has(#frame:not([hidden])) {grid-template-rows:auto auto auto auto minmax(0,55fr) minmax(0,45fr) auto;}
  .app.editing:has(#post:not([hidden])) {grid-template-rows:auto auto auto auto minmax(0,42fr) minmax(0,58fr) auto;}
  .app.editing .flow-next {grid-column:1/-1;}
  .app.editing:has(#filter:not([hidden])) > .flow-next {grid-row:8;}
  .app.editing:has(#frame:not([hidden])) > .flow-next,
  .app.editing:has(#post:not([hidden])) > .flow-next {grid-row:7;}
  .app.editing #filter .buttons {grid-template-columns:1fr!important;}
}
@media (min-width:900px), (orientation:landscape) and (min-width:600px) and (max-height:650px), (orientation:portrait) and (max-width:899px) {
  .app.editing:has(#frame:not([hidden])) > .preview {align-self:start;}
  .app.editing:has(#frame:not([hidden])) > .preview[data-shape="portrait-tall"],
  .app.editing:has(#post:not([hidden])) > .preview[data-shape="portrait-tall"],
  .app.editing:has(#filter:not([hidden])) > .preview[data-shape="portrait-tall"] {
    width:auto!important;height:100%;max-width:100%;max-height:100%;aspect-ratio:9/16;
  }
}

.location-editor-footer {flex:none;padding-bottom:env(safe-area-inset-bottom);}
.location-editor-footer button {width:100%;min-height:52px;background:#b53d32;color:#fff9ed;font-weight:800;}
.post-alt-section {margin:12px 0;padding:12px;border:1px solid #cfad84;border-radius:12px;background:#fff8ed;}
.post-alt-section label {display:block;font-weight:800;}
.post-alt-section #alt {display:block;width:100%;max-width:100%;min-height:100px;margin-top:8px;resize:vertical;}
#postEditorDialog:not(.with-location) [data-food-variable="$place"],#postEditorDialog:not(.with-location) [data-food-variable="$spot"],#postEditorDialog:not(.with-location) #openLocationFromPostEditor {display:none;}

.post-slot-selection {margin:10px 0 4px;font-weight:800;color:#7c3229;}
.post-slot-guide {margin:4px 0 8px;font-size:12px;line-height:1.6;color:#694533;}
.post-slot-actions #deletePostSlot:not(:disabled) {border-color:#aa6e4f;background:#fff7ea;color:#793e2c;}

.post-slot-manage {margin:-3px 0 12px;color:#694533;font-size:12px;}
.post-slot-manage summary {cursor:pointer;}
.post-slot-manage button {min-height:42px;margin-top:9px;border:1px solid #aa6e4f;background:#fff7ea;color:#793e2c;}
.post-slot-buttons button.saved {-webkit-touch-callout:none;user-select:none;}

.post-action-footer #postActionStatus {margin:0 0 8px;padding:8px 10px;border-radius:9px;background:#fff7e9;color:#783b27;font-size:13px;font-weight:700;line-height:1.4;}
.post-action-footer #postActionStatus:empty {display:none;}

.posting-dialog {position:fixed;inset:0;width:min(380px,calc(100vw - 36px));max-width:none;margin:auto;padding:32px 24px;border:2px solid #b77952;border-radius:22px;background:#fff4e2;color:#573421;text-align:center;box-shadow:0 22px 75px #2a160b88;}
.posting-dialog::backdrop {background:#27180cf0;}
.posting-dialog[open] {display:grid;justify-items:center;gap:12px;}
.posting-dialog h2 {margin:0;font-size:25px;}
.posting-dialog p {margin:0;line-height:1.6;font-size:15px;}
.posting-spinner {width:44px;height:44px;border:5px solid #e5c7a3;border-top-color:#b53d32;border-radius:50%;animation:posting-spin 0.8s linear infinite;}
@keyframes posting-spin {to {transform:rotate(360deg);}}
.posting-dialog.complete .posting-spinner {display:grid;place-items:center;border:0;background:#b53d32;color:white;animation:none;}
.posting-dialog.complete .posting-spinner::after {content:'✓';font-size:27px;font-weight:900;}

.preview #empty #bonkurazCapability[data-state="ready"] {flex-direction:column;gap:3px;padding:5px 8px;}
.preview #empty #bonkurazCapability img {display:block;max-width:100%;width:auto;height:24px;object-fit:contain;}
.preview #empty #bonkurazCapability strong {font-size:10px;line-height:1.1;white-space:nowrap;}

.preview #empty #bonkurazCapability small {font-size:10px;line-height:1.2;color:#ffe19a;font-weight:800;text-align:center;}

/* 共通の見分け方：太枠は操作、濃い面は情報、黄色は選択中。 */
.app button:not(:disabled),dialog button:not(:disabled),.app .button,.app summary {border-width:2px;}
.app button.main:not(:disabled),dialog button.main:not(:disabled),
.post-action-menu #postPublishAction:not(:disabled),
.post-action-footer button:not(:disabled) {background-color:#b53d32;border-color:#90291f;color:#fff9ed;}
.app .choices button.selected,.app .scene-options button.selected,
.app .selected-scene,.app .post-slot-buttons button[aria-pressed="true"],
.app .nearby-list button.selected {background-color:#f9d68b;border:2px solid #995326;color:#512e1e;}
.app .post-slot-buttons button[aria-pressed="true"]::after {color:#512e1e;}
.app button:disabled,dialog button:disabled {border-width:1px;background-color:#e4ddd1;color:#746b61;opacity:1;cursor:not-allowed;}
.app .steps button:disabled,.app.editing .steps [data-step="post"]:disabled {border-width:1px;background:#e4ddd1;color:#746b61;}
header #brandHome {border:2px solid #ae754d;border-radius:10px;background:#fff5e4;padding:3px;}
header .revision-line #checkVersion {border:2px solid #aa754f;border-radius:8px;background:#fff7e9;padding:5px 7px;color:#793c28;text-decoration:none;}
.preview #empty .member-link:has(#memberMark:not([hidden])) {border:2px solid #b58b55;background:#fff3dc;}
.preview #empty .hero-capabilities > span {border-width:1px;background:#433027;color:#fff2dc;}
.preview #empty #blueskyCapability[data-state="ready"] {background:#104571;border-color:#3185b7;color:#fff;}
.preview #empty #bonkurazCapability[data-state="ready"] {background:#082d50;border-color:#d6ae49;color:#ffe19a;}
.preview #empty #blueskyCapability[data-state="checking"],
.preview #empty #blueskyCapability[data-state="unavailable"],
.preview #empty #bonkurazCapability[data-state="checking"],
.preview #empty #bonkurazCapability[data-state="unavailable"] {background:#45362c;border-color:#8a7058;color:#fff2dc;}
.post-slot-panel #postSlotStatus,.post-action-footer #postActionStatus {padding:9px 11px;border:1px solid #74543e;border-radius:9px;background:#493428;color:#fff2dc;}
.post-slot-panel #postSlotStatus:empty {display:none;}
.post-slot-manage summary {padding:7px 9px;border:2px solid #ae754d;border-radius:8px;background:#fff7e9;color:#694533;}

/* 選択内容の説明は操作部品ではないため、囲まず文字として見せる。 */
.app.editing #lookSummary,.app.editing #coverSummary {
  border:0;border-radius:0;background:transparent;box-shadow:none;
  padding:3px 4px;color:#573724;font-weight:700;line-height:1.5;
}

/* 開いている位置情報OSDの内側に重ね、iOSの多重dialog表示に依存しない。 */
.location-wait-overlay:not([hidden]) {position:fixed;inset:0;z-index:2000;display:grid;place-items:center;padding:18px;background:#27180fe3;}
dialog .location-wait-overlay:not([hidden]) {position:absolute;z-index:50;border-radius:inherit;}
.location-wait-card {display:grid;justify-items:center;gap:12px;width:min(380px,100%);padding:30px 22px;border:2px solid #a76e4a;border-radius:20px;background:#fff2de;color:#513424;text-align:center;box-shadow:0 20px 70px #2a160b88;}
.location-wait-card h2 {margin:0;font-size:23px;}
.location-wait-card p {margin:0;line-height:1.5;font-size:14px;color:#5d412c;}
.location-wait-spinner {width:42px;height:42px;border:5px solid #e9ceaa;border-top-color:#b53d32;border-radius:50%;animation:posting-spin .8s linear infinite;}

/* 取得中は既存 dialog の内容を直接入れ替え、iOS のモーダル重なり順に依存しない。 */
.location-editor-dialog[open]:has(> .location-progress-screen) {display:block;}
.location-progress-screen {box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;width:100%;height:100%;padding:20px;text-align:center;color:#4f3324;}
.location-progress-screen h2 {margin:0;font-size:clamp(20px,5vw,27px);}
.location-progress-screen p {margin:0;font-size:15px;line-height:1.6;}
.location-progress-screen button {width:100%;max-width:340px;min-height:52px;margin-top:12px;border:3px solid #ab7956;border-radius:14px;background:#fff8e9;color:#633622;font-weight:800;}
.location-editor-dialog[open]:has(> .location-progress-screen) > :not(.location-progress-screen) {display:none!important;}
/* 店舗一覧は dialog の中にあり、フォーム共通ボタンの ID セレクターより優先する。 */
#locationEditorDialog #locationPanel .nearby-list button.nearby-place.selected,
#locationEditorDialog #locationPanel .nearby-list button.nearby-place[aria-pressed="true"] {background:#ae3d31;color:#fffaf1;border:3px solid #81271f;box-shadow:0 3px 10px #79302155;font-weight:800;}
#locationEditorDialog #locationPanel .nearby-list button.nearby-place.selected:focus-visible {outline:3px solid #f5c768;outline-offset:2px;}

/* 近隣店舗の種類を選ぶスイッチ。 */
#locationEditorDialog #locationPanel label.convenience-toggle {display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 0 12px;padding:14px 16px;border:2px solid #af805b;border-radius:14px;background:#fff8ec;color:#583521;font-weight:800;cursor:pointer;}
#locationEditorDialog #locationPanel .convenience-toggle input {appearance:none;-webkit-appearance:none;position:relative;flex:none;display:block;width:54px;height:32px;min-width:54px;margin:0;border:2px solid #916d51;border-radius:20px;background:#d8c8b5;cursor:pointer;}
#locationEditorDialog #locationPanel .convenience-toggle input::after {content:'';position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fffaf1;box-shadow:0 1px 3px #32201755;transition:transform .15s;}
#locationEditorDialog #locationPanel .convenience-toggle input:checked {background:#ae3d31;border-color:#81271f;}
#locationEditorDialog #locationPanel .convenience-toggle input:checked::after {transform:translateX(22px);}
#locationEditorDialog #locationPanel .convenience-toggle input:focus-visible {outline:3px solid #256fa6;outline-offset:3px;}

#locationEditorDialog #locationPanel button#useManualStore.selected,
#locationEditorDialog #locationPanel button#useManualStore[aria-pressed="true"] {background:#ae3d31;color:#fffaf1;border:3px solid #81271f;box-shadow:0 3px 10px #79302155;font-weight:800;}
#locationEditorDialog #locationPanel button#useManualStore.selected:focus-visible {outline:3px solid #f5c768;outline-offset:2px;}

/* 投稿文テンプレートは必要なときだけ開き、プレビューと入力欄を先に表示する。 */
.post-template-details {margin:8px 0 14px;border:2px solid #b88c66;border-radius:13px;background:#fff8e9;color:#59351f;}
.post-template-details > summary {padding:13px 14px;font-weight:800;cursor:pointer;list-style:none;}
.post-template-details > summary::-webkit-details-marker {display:none;}
.post-template-details > summary::after {content:'開く ▾';float:right;color:#894b32;font-size:13px;}
.post-template-details[open] > summary::after {content:'閉じる ▴';}
.post-template-details > summary:focus-visible {outline:3px solid #b53d32;outline-offset:3px;}
.post-template-body {padding:0 12px 12px;}
.post-template-body .post-slot-panel {margin:0 0 12px;}

.post-editor-write .post-template-details {flex:none;margin:3px 0 0;min-height:0;}
.post-editor-write .post-template-details[open] {max-height:min(40dvh,320px);overflow-y:auto;overscroll-behavior:contain;}
.post-editor-write .post-template-details > summary {position:sticky;top:0;z-index:1;background:#fff8e9;border-radius:11px;}
.post-alt-section > summary {font-weight:800;cursor:pointer;list-style:none;}
.post-alt-section > summary::-webkit-details-marker {display:none;}
.post-alt-section > summary::after {content:'開く ▾';float:right;color:#894b32;font-size:13px;}
.post-alt-section[open] > summary::after {content:'閉じる ▴';}
.post-alt-section[open] > summary {margin-bottom:12px;}
.post-alt-section > summary:focus-visible {outline:3px solid #b53d32;outline-offset:3px;}

#empty .camera-start-feedback {margin:0;color:#fff2df;font-size:13px;font-weight:700;line-height:1.5;text-align:center;}
#empty .camera-start-feedback:empty {display:none;}
.app.editing .flow-next .buttons[hidden] {display:none!important;}
.app.editing .flow-next.post-flow-actions:not([hidden]) {flex-direction:column;align-items:stretch;gap:9px;}
.app.editing .flow-next.post-flow-actions .buttons {order:0;}
.app.editing .flow-next.post-flow-actions #send {order:1;display:block;width:100%;min-height:52px;}

/* 投稿画面: 左上に写真、左下に投稿プレビュー、右に投稿方法。操作は共通の最下段。 */
@media (min-width:900px), (orientation:landscape) and (min-width:600px) and (max-height:650px), (orientation:portrait) and (max-width:899px) {
  .app.editing:has(#post:not([hidden])) {grid-template-rows:auto auto auto auto minmax(0,60fr) minmax(0,40fr) auto!important;}
  .app.editing:has(#post:not([hidden])) > .preview {grid-column:1;grid-row:5!important;align-self:center;justify-self:center;max-height:100%;}
  .app.editing:has(#post:not([hidden])) > #editReview:not([hidden]) {
    display:block!important;grid-column:1;grid-row:6!important;align-self:stretch;justify-self:stretch;
    width:100%;height:100%;min-height:0;overflow-y:auto;padding:9px;
    border:1px solid #cfad84;border-radius:14px;background:#faeedb;
  }
  .app.editing:has(#post:not([hidden])) > #editReview .post-preview {margin:0;padding:5px;background:transparent;border:0;}
  .app.editing:has(#post:not([hidden])) > #editReview #threadPreview {max-height:none;}
  .app.editing:has(#post:not([hidden])) > #post:not([hidden]) {
    grid-column:2;grid-row:5 / 7!important;align-self:stretch;overflow-y:auto;
    width:100%;min-height:0;margin:0;padding:10px;
  }
  .app.editing:has(#post:not([hidden])) > .flow-next.post-flow-actions {grid-column:1/-1;grid-row:7!important;}
  .app.editing .post-flow-actions .buttons {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;width:100%;margin:0!important;padding:0!important;border:0;background:transparent;}
  .app.editing .post-flow-actions .buttons button {min-width:0;min-height:48px;padding:8px;font-size:14px;}
}

/* 仕上げ: 左のプレビューを保ち、操作は右の大きなOSDボタンへ集約する。 */
.frame-menu .panel-scroll {display:flex;flex-direction:column;gap:10px;min-width:0;}
.frame-menu .panel-scroll > h2 {margin:0;font-size:clamp(16px,4vw,22px);}
.frame-menu .panel-scroll > p {margin:0 0 4px;font-size:12px;line-height:1.45;}
.frame-menu .frame-menu-button {display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:6px;flex:none;width:100%;min-width:0;min-height:82px;padding:13px 14px;border:3px solid #a36a3f;border-radius:16px;background:#fff5e3;color:#4d2c1f;text-align:left;overflow-wrap:anywhere;touch-action:manipulation;}
.frame-menu .frame-menu-button b {font-size:clamp(16px,4.4vw,22px);line-height:1.25;}
.frame-menu .frame-menu-button small {font-size:clamp(11px,3vw,14px);line-height:1.35;color:#6d4933;}
.frame-menu .frame-menu-button strong {color:#57311f;}
.frame-menu .frame-menu-description {font-size:12px;line-height:1.35;color:#654730;}
.frame-menu .frame-menu-button:focus-visible {outline:3px solid #b53d32;outline-offset:3px;}
.caption-dialog {width:min(560px,calc(100% - 24px));height:min(780px,calc(100dvh - 32px));}
.caption-dialog-scroll {flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:8px 2px 24px;}
.caption-dialog-scroll h3 {margin:8px 0 12px;}
.caption-dialog-scroll label {display:block;margin:13px 0;min-width:0;}
.caption-dialog-scroll input,.caption-dialog-scroll textarea {display:block;box-sizing:border-box;width:100%;min-width:0;max-width:100%;padding:11px;border:2px solid #bc9474;border-radius:11px;background:#fff9ee;color:#4b2f23;font-size:16px;}
.caption-dialog-scroll #diaryDate {min-width:0;max-width:100%;}
.caption-dialog-scroll .diary-fields {min-width:0;max-width:100%;padding:10px;border:1px solid #cba881;border-radius:14px;background:#f8e7cd;}
.caption-dialog-scroll .diary-fields p,.caption-dialog-scroll #titleField small {color:#694d3c;}
.caption-dialog-scroll .extra-choices {margin:12px 0;padding:10px 0;border-top:1px solid #bc9474;}
.caption-dialog-scroll .variable-buttons {display:flex;flex-wrap:wrap;gap:8px;}
.caption-dialog-scroll button {margin:6px 0;max-width:100%;}
@media (min-width:900px), (orientation:landscape) and (min-width:600px) and (max-height:650px), (orientation:portrait) and (max-width:899px) {
  .app.editing:has(#frame:not([hidden])) {grid-template-rows:auto auto auto auto minmax(0,1fr) auto!important;}
  .app.editing:has(#frame:not([hidden])) > .preview {grid-column:1;grid-row:5!important;align-self:center;justify-self:center;max-height:100%;}
  .app.editing:has(#frame:not([hidden])) > #frame:not([hidden]) {grid-column:2;grid-row:5!important;align-self:stretch;width:100%;min-height:0;margin:0;padding:12px;overflow:hidden;}
  .app.editing:has(#frame:not([hidden])) > .flow-next {grid-column:1/-1;grid-row:6!important;}
}
@media (orientation:portrait) and (max-width:899px) {
  .app.editing:has(#frame:not([hidden])) > #frame:not([hidden]) {padding:10px 8px;}
  .frame-menu .frame-menu-button {min-height:90px;padding:10px 8px;}
  .frame-menu .frame-menu-button b {font-size:clamp(15px,4vw,19px);}
}

#frame .frame-menu-button #coverSummary {display:block;margin:0;padding:0;border:0;border-radius:0;background:transparent;color:#654730;}

/* 加工画面はプレビューを主役にし、操作は画面下半分のOSDへ。 */
.app.editing:has(#filter:not([hidden])) > #filter:not([hidden]) {display:none!important;}
.app.editing:has(#filter:not([hidden])) > :is(#enhanceRail,#sceneRail,#textureRail) {display:none!important;}
.app.editing:has(#filter:not([hidden])) > .preview {
  align-self:center!important;justify-self:center!important;width:auto!important;height:auto!important;
  max-width:100%!important;max-height:100%!important;margin:0 auto;box-shadow:0 12px 30px #4c301533;
}
.app.editing:has(#filter:not([hidden])) > .flow-next:not([hidden]) {flex-direction:column;align-items:stretch;gap:8px;}
.app.editing:has(#filter:not([hidden])) #compare:not([hidden]) {display:block;width:100%;min-height:45px;border:3px solid #a47754;background:#fff4e4;color:#543522;}
.app.editing:has(#filter:not([hidden])) #compare[aria-pressed="true"] {background:#55382d;color:#fff6e8;border-color:#55382d;}
@media (min-width:900px), (orientation:landscape) and (min-width:600px) and (max-height:650px), (orientation:portrait) and (max-width:899px) {
  .app.editing:has(#filter:not([hidden])) {grid-template-rows:auto auto auto auto minmax(0,1fr) auto!important;}
  .app.editing:has(#filter:not([hidden])) > .preview {grid-column:1/-1;grid-row:5!important;}
  .app.editing:has(#filter:not([hidden])) > .flow-next:not([hidden]) {grid-column:1/-1;grid-row:6!important;}
}
.filter-sheet {position:fixed;inset:auto 12px max(8px,env(safe-area-inset-bottom)) 12px;width:calc(100% - 24px);height:min(53dvh,540px);max-width:720px;max-height:none;margin:0 auto;padding:14px;border:2px solid #b98759;border-radius:20px;}
.filter-sheet::backdrop {background:#26170e44;}
.filter-sheet .scene-dialog-head {padding-bottom:10px;border-bottom:1px solid #d2b18d;}
.filter-sheet-actions,.filter-sheet-content {flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:12px 2px max(12px,env(safe-area-inset-bottom));}
.filter-sheet-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(88px,max-content);align-content:start;gap:10px;}
.filter-sheet-actions button {width:100%;min-width:0;min-height:88px;border:3px solid #a3704f;border-radius:14px;background:#fff5e4;color:#533323;text-align:center;font-size:clamp(15px,4vw,19px);font-weight:800;overflow-wrap:anywhere;}
.filter-sheet-actions button small {display:block;margin-top:5px;font-size:12px;font-weight:600;color:#79533a;}
.filter-sheet .scene-options {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
.filter-sheet .scene-options button {min-width:0;min-height:80px;padding:10px;overflow-wrap:anywhere;}
.filter-sheet .scene-options button b {font-size:clamp(14px,4vw,18px);}
.filter-sheet .scene-options button small {font-size:11px;}
.filter-sheet-content .enhance-choice {margin:0;padding:0;border:0;background:transparent;}
.filter-sheet-content .enhance-choice h3 {margin:0 0 8px;}
.filter-sheet-content .enhance-choice p {font-size:13px;}
.filter-sheet-content .enhance-choice button {min-height:48px;}
.filter-sheet-actions button,.filter-sheet .scene-options button,.filter-sheet .scene-dialog-head button,.app.editing #compare {
  -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:manipulation;
}
.filter-sheet-actions button *,.filter-sheet .scene-options button *,.filter-sheet .scene-dialog-head button *,.app.editing #compare * {pointer-events:none;}
/* シーンと質感も同じ高さで開き、写真の上半分を見ながら選べる。 */
body > #sceneDialog,body > #textureDialog {position:fixed;inset:auto 12px max(8px,env(safe-area-inset-bottom)) 12px;width:calc(100% - 24px);height:min(53dvh,540px);max-width:720px;max-height:none;margin:0 auto;padding:14px;border:2px solid #b98759;border-radius:20px;}
body > #sceneDialog::backdrop,body > #textureDialog::backdrop {background:#26170e44;}
body > #sceneDialog .scene-options,body > #textureDialog .scene-options {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
body > #sceneDialog .scene-options button,body > #textureDialog .scene-options button {min-width:0;min-height:78px;padding:9px;overflow-wrap:anywhere;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:manipulation;}
body > #sceneDialog .scene-options button *,body > #textureDialog .scene-options button * {pointer-events:none;}

.app.editing:has(#filter:not([hidden])) > .preview {width:100%!important;height:100%!important;aspect-ratio:auto!important;box-shadow:none;background:transparent;}
.app.editing:has(#filter:not([hidden])) > .preview canvas {object-fit:contain;object-position:center;}

/* 操作仕様: ボタンは枠全体を押せるようにし、文字選択を抑える。入力欄は対象外。 */
button,input[type="button"],input[type="submit"],input[type="reset"],.button,[role="button"],summary {-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:manipulation;}
button *, .button *,[role="button"] *,summary * {pointer-events:none;-webkit-user-select:none;user-select:none;}
/* 更新通知のカード全面を本物のボタンにする。 */
.update-notice.update-available {position:relative;min-height:76px;padding:12px 14px;border:3px solid #8f291e;background:linear-gradient(135deg,#bc3c30,#e35537);color:#fff9ec;box-shadow:0 5px 0 #712318,0 12px 25px #7a281c66;cursor:pointer;}
.update-notice.update-available .update-copy strong {font-size:clamp(15px,4vw,19px);color:#fff9ec;}
.update-notice.update-available .update-copy span {font-size:12px;color:#fff0d7;}
.update-notice .update-cta {display:none;}
.update-notice.update-available .update-cta {display:block;flex:none;max-width:78px;margin:0;font-size:14px;font-weight:900;line-height:1.2;color:#fff9ec;text-align:center;}
.update-notice #updateNow:not([hidden]) {position:absolute;z-index:1;inset:0;display:block;width:100%;height:100%;min-width:0;min-height:0;margin:0;padding:0;border:0;border-radius:inherit;background:transparent;color:transparent;cursor:pointer;}
.update-notice #updateNow:focus-visible {outline:4px solid #155a91;outline-offset:4px;}
.update-notice #updateDismiss:not([hidden]) {position:relative;z-index:2;}
.update-notice.update-available:active {background:linear-gradient(135deg,#972b21,#c8462f);transform:translateY(2px);box-shadow:0 3px 0 #712318,0 8px 16px #7a281c55;}

/* 加工画面は旧２列レイアウトを解除。写真全体を比率のまま、使用可能な幅と高さに最大化する。 */
.app.editing:not(.camera-active):has(#filter:not([hidden])) {display:flex!important;flex-direction:column!important;}
.app.editing:not(.camera-active):has(#filter:not([hidden])) > :is(header,.steps,.update-notice,.oauth-notice,.flow-next) {flex:none;}
.app.editing:not(.camera-active):has(#filter:not([hidden])) > .preview {
  flex:1 1 0!important;align-self:stretch!important;justify-self:stretch!important;
  width:100%!important;height:auto!important;min-height:0;max-width:none!important;max-height:none!important;
  margin:0!important;aspect-ratio:auto!important;background:transparent;box-shadow:none;
}
.app.editing:not(.camera-active):has(#filter:not([hidden])) > .preview canvas {width:100%;height:100%;object-fit:contain!important;object-position:center!important;position:absolute;inset:0;min-width:0;min-height:0;}
.app.editing:not(.camera-active):has(#filter:not([hidden])) > .flow-next:not([hidden]) {width:100%;}

/* ②加工の二手目は main.app 内の dialog に直接適用する。上側の写真を見ながら選択する。 */
.app.editing:has(#filter:not([hidden])) > :is(#sceneDialog,#textureDialog) {
  position:fixed;inset:auto 12px max(8px,env(safe-area-inset-bottom)) 12px!important;
  width:calc(100% - 24px)!important;max-width:720px!important;
  height:min(50dvh,540px)!important;max-height:none!important;
  margin:0 auto!important;padding:12px;border:2px solid #b98759;border-radius:20px;
}
.app.editing:has(#filter:not([hidden])) > :is(#sceneDialog,#textureDialog)::backdrop {background:#26170e44;}
.app.editing:has(#filter:not([hidden])) > :is(#sceneDialog,#textureDialog) .scene-options {
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:max-content;
  overflow-y:auto;gap:8px;min-height:0;
}
.app.editing:has(#filter:not([hidden])) > :is(#sceneDialog,#textureDialog) .scene-options button {
  min-width:0;min-height:78px;padding:9px;overflow-wrap:anywhere;
  -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:manipulation;
}
.app.editing:has(#filter:not([hidden])) > :is(#sceneDialog,#textureDialog) .scene-options button * {pointer-events:none;}
/* 加工の一手目も、main 内にある dialog 自身へ下部配置を適用する。 */
.app.editing:has(#filter:not([hidden])) > :is(#filterMenuDialog,#magicDialog) {
  position:fixed;inset:auto 12px max(8px,env(safe-area-inset-bottom)) 12px!important;
  width:calc(100% - 24px)!important;max-width:720px!important;
  height:min(50dvh,540px)!important;max-height:none!important;
  margin:0 auto!important;padding:12px;border:2px solid #b98759;border-radius:20px;
}

/* ③仕上げ: メニューを開いていないときは写真全体を最大表示する。 */
.app.editing:not(.camera-active):has(#frame:not([hidden])) {display:flex!important;flex-direction:column!important;}
.app.editing:has(#frame:not([hidden])) > #frame:not([hidden]) {display:none!important;}
.app.editing:has(#frame:not([hidden])) > :is(header,.steps,.update-notice,.oauth-notice,.flow-next) {flex:none;}
.app.editing:has(#frame:not([hidden])) > .preview {
  flex:1 1 0!important;align-self:stretch!important;justify-self:stretch!important;
  width:100%!important;height:auto!important;min-height:0;max-width:none!important;max-height:100dvh!important;
  margin:0!important;aspect-ratio:auto!important;background:transparent;box-shadow:none;touch-action:none;
  transition:max-height .26s ease-in-out;
}
.app.editing:has(#frame:not([hidden])) > .preview canvas {
  position:absolute;inset:0;min-width:0;min-height:0;width:100%;height:100%;
  object-fit:contain!important;object-position:center!important;touch-action:none;
}
.app.editing:has(#frame:not([hidden])) > .flow-next:not([hidden]) {width:100%;}
/* OSD中は文字も含めた完成画像を上半分に収める。拡大は表示だけに適用する。 */
.app.editing:has(#frame:not([hidden])):has(:is(#designDialog,#formatDialog,#captionDialog)[open]) > .preview {
  max-height:max(90px,calc(50dvh - var(--frame-preview-top,140px) - 12px))!important;
}
.app.editing:has(#frame:not([hidden])):has(:is(#designDialog,#formatDialog,#captionDialog)[open]) > .preview canvas {object-position:center top!important;}
.app.editing:has(#frame:not([hidden])):has(:is(#designDialog,#formatDialog,#captionDialog)[open]) > .flow-next:not([hidden]) {margin-top:auto;}
@media (prefers-reduced-motion:reduce) {.app.editing:has(#frame:not([hidden])) > .preview {transition:none;}}
.app.editing:has(#frame:not([hidden])) > :is(#frameMenuDialog,#designDialog,#formatDialog,#captionDialog) {
  position:fixed;inset:auto 12px max(8px,env(safe-area-inset-bottom)) 12px!important;
  z-index:50;width:calc(100% - 24px)!important;max-width:720px!important;
  height:min(50dvh,540px)!important;max-height:none!important;
  margin:0 auto!important;padding:12px;border:2px solid #b98759;border-radius:20px;
}
.app.editing:has(#frame:not([hidden])) > :is(#designDialog,#formatDialog) .scene-options {
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:max-content;
  overflow-y:auto;gap:8px;min-height:0;
}
.app.editing:has(#frame:not([hidden])) > :is(#designDialog,#formatDialog) .scene-options button {min-width:0;min-height:78px;padding:9px;overflow-wrap:anywhere;}
.app.editing:has(#frame:not([hidden])) > #frameMenuDialog .panel-scroll {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:max-content;align-content:start;align-items:stretch;gap:9px;overflow-y:auto;min-height:0;}
.app.editing:has(#frame:not([hidden])) > #frameMenuDialog .panel-scroll > :is(h2,p) {grid-column:1/-1;}
.app.editing:has(#frame:not([hidden])) > #frameMenuDialog .panel-scroll .frame-menu-button {
  min-width:0;min-height:112px;height:100%;align-self:stretch;
  justify-content:flex-start;align-items:flex-start;gap:5px;padding:12px 10px;
}
.app.editing:has(#frame:not([hidden])) > #frameMenuDialog .frame-menu-button :is(b,small,.frame-menu-description) {display:block;width:100%;margin:0;text-align:left;line-height:1.4;}
.app.editing:has(#frame:not([hidden])) > #frameMenuDialog .frame-menu-button #coverSummary {margin-top:5px;}
.app.editing:has(#frame:not([hidden])) > #frameMenuDialog .panel-scroll #cropHint {display:none;}
.app.editing:has(#frame:not([hidden])) > #captionDialog .caption-dialog-scroll {overflow-y:auto;min-height:0;}
#captionDialog #templateStatus:not([hidden]) {
  position:absolute;z-index:5;top:68px;left:16px;right:16px;
  margin:0;padding:12px 14px;border:2px solid #8c5430;border-radius:13px;
  background:#fff4d1;color:#55341e;font-size:16px;font-weight:800;
  text-align:center;box-shadow:0 9px 25px #3a241f55;pointer-events:none;
}
#captionDialog #templateStatus[data-kind="error"] {border-color:#a63830;background:#fff1e8;color:#a63830;}
/* iPhone の日付欄が固有の最小幅で日記枠を押し広げないよう、親から幅を固定する。 */
#captionDialog .caption-dialog-scroll,
#captionDialog #frameCaptionGroup,
#captionDialog #diaryFields,
#captionDialog #diaryFields label {box-sizing:border-box;width:100%;min-width:0;max-width:100%;}
#captionDialog #diaryDate {
  display:block;box-sizing:border-box;inline-size:100%!important;min-inline-size:0!important;
  max-inline-size:100%!important;width:100%!important;min-width:0!important;max-width:100%!important;
  -webkit-appearance:none;appearance:none;
}

/* ④投稿: 完成写真、投稿文プレビューを上下に置き、メニューと入力は下半分のOSDにする。 */
.app.editing:not(.camera-active):has(#post:not([hidden])) {display:flex!important;flex-direction:column!important;}
.app.editing:has(#post:not([hidden])) > :is(header,.steps,.update-notice,.oauth-notice,.flow-next) {flex:none;}
.app.editing:has(#post:not([hidden])) > #post:not([hidden]),
.app.editing:has(#post:not([hidden])) > #templateRail {display:none!important;}
.app.editing:has(#post:not([hidden])) > .preview {
  position:relative;flex:1 1 58%!important;align-self:stretch!important;justify-self:stretch!important;
  width:100%!important;height:auto!important;min-height:0;max-width:none!important;max-height:none!important;
  margin:0!important;aspect-ratio:auto!important;background:transparent;box-shadow:none;
  transition:height .25s ease;
}
.app.editing:has(#post:not([hidden])) > .preview canvas {
  position:absolute;inset:0;width:100%;height:100%;object-fit:contain!important;object-position:center!important;
}
.app.editing:has(#post:not([hidden])) > #editReview:not([hidden]) {
  display:block!important;position:relative;flex:1 1 42%!important;align-self:stretch!important;justify-self:stretch!important;
  width:100%!important;height:auto;min-height:75px;max-height:none;overflow-y:auto;
  margin:8px 0!important;padding:10px 14px!important;border:2px solid #c8a27d;border-radius:16px;
  background:#faeedb;color:#513424;
  transition:height .25s ease;
}
.app.editing:has(#post:not([hidden])) > #editReview .post-preview {margin:0;padding:0;background:transparent;border:0;}
.app.editing:has(#post:not([hidden])) > #editReview #threadPreview {max-height:none;}
.app.editing:has(#post:not([hidden])) > .flow-next.post-flow-actions:not([hidden]) {width:100%;margin-top:auto;}
.app.editing.post-sheet-open:has(#post:not([hidden])) > :is(.preview,#editReview:not([hidden])) {flex:none!important;max-height:none!important;}
body:has(.app.editing #post:not([hidden])) > :is(#postMenuDialog,#postActionDialog,#postEditorDialog,#locationEditorDialog) {
  position:fixed;inset:auto 12px max(8px,env(safe-area-inset-bottom)) 12px;
  width:calc(100% - 24px);max-width:720px;height:min(50dvh,540px);max-height:none;
  margin:0 auto;padding:12px;border:2px solid #b98759;border-radius:20px;
  background:#faeedb;box-shadow:0 14px 44px #29180f80;
}
body:has(.app.editing #post:not([hidden])) > :is(#postMenuDialog,#postActionDialog,#postEditorDialog,#locationEditorDialog)::backdrop {background:transparent;}
#postMenuDialog {z-index:40;}
#postActionDialog {z-index:42;}
#postEditorDialog {z-index:44;}
#locationEditorDialog {z-index:46;}
body:has(.app.editing #post:not([hidden])) > #postMenuDialog[open] {display:flex;flex-direction:column;}
#postMenuDialog .filter-sheet-actions {display:block;overflow-y:auto;padding:12px 2px;}
#postMenuDialog .post-action-menu {
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:max-content;
  align-content:start;align-items:stretch;gap:10px;min-width:0;width:100%;padding:0;
}
#postMenuDialog .post-action-menu > :is(h2,p) {grid-column:1/-1;margin:0;}
#postMenuDialog .post-action-menu h2 {font-size:19px;}
#postMenuDialog .post-action-menu p {margin-bottom:8px;font-size:13px;}
#postMenuDialog .post-action-menu button {
  display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:8px;
  width:100%;min-width:0;min-height:150px;height:100%;padding:14px 12px;
  border:3px solid #a3704f;border-radius:14px;
  font-size:clamp(15px,3.7vw,19px);font-weight:800;text-align:left;line-height:1.35;
  overflow-wrap:anywhere;
}
#postMenuDialog .post-action-menu button small {display:block;margin:0;font-size:12px;font-weight:650;line-height:1.4;color:#694b38;}
#postMenuDialog #postPublishAction:not(:disabled) small {color:#fff8e9;}
body:has(.app.editing #post:not([hidden])) > #postEditorDialog[open] {display:flex;flex-direction:column;gap:8px;}
#postEditorDialog #postEditorReview {display:none;}
#postEditorDialog .post-editor-write {flex:1;min-height:0;overflow-y:auto;}
#postEditorDialog [hidden] {display:none!important;}
#postEditorDialog .post-template-view {flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:4px 2px 12px;}
#postEditorDialog .post-template-view #postTemplateContent {width:100%;min-width:0;}
#postEditorDialog .post-template-view .post-template-details {display:block;margin:0;border:0;background:transparent;}
#postEditorDialog .post-template-view .post-template-details > summary {display:none;}
#postEditorDialog .post-template-view .post-template-body {padding:0;}
#postEditorDialog .post-template-view .post-slot-panel {padding:12px;margin:0 0 12px;}
#postEditorDialog .post-template-view .post-slot-buttons {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-flow:row;gap:8px;overflow:visible;}
#postEditorDialog .post-template-view .post-slot-buttons button {min-width:0;min-height:86px;padding:8px 4px;font-size:23px;}
#postEditorDialog .post-template-view #editPostFromTemplate {display:block;width:100%;min-height:48px;margin-top:12px;border:3px solid #ae805d;border-radius:12px;background:#fff8e9;color:#5b3424;font-weight:800;}
#postEditorDialog .post-template-confirm {display:flex;flex:1;min-height:0;flex-direction:column;gap:9px;padding:5px 2px 10px;}
#postEditorDialog .post-template-confirm h3 {margin:0;font-size:18px;color:#573522;}
#postEditorDialog .post-template-confirm p {margin:0;color:#6a4a35;font-size:13px;}
#postEditorDialog .post-template-confirm-text {
  flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;white-space:pre-wrap;overflow-wrap:anywhere;
  padding:14px;border:2px solid #c5a07b;border-radius:13px;background:#fff8eb;color:#3e2b23;
  font-size:16px;line-height:1.65;
}
#postEditorDialog .post-template-confirm-actions {display:grid;grid-template-columns:1fr 1fr;gap:9px;flex:none;}
#postEditorDialog .post-template-confirm-actions button {min-width:0;min-height:50px;padding:8px;border:3px solid #a87653;border-radius:12px;font-weight:800;}
#postEditorDialog .post-template-confirm-actions #applyPostTemplate {border-color:#90291f;background:#b53d32;color:#fff9ed;}
#postMenuDialog button,#postActionDialog button,#postEditorDialog button,#locationEditorDialog button {
  -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:manipulation;
}
#postMenuDialog button *,#postActionDialog button *,#postEditorDialog button *,#locationEditorDialog button * {pointer-events:none;}
@media (prefers-reduced-motion:reduce) {
  .app.editing:has(#post:not([hidden])) > :is(.preview,#editReview) {transition:none;}
}

/* Keep the live camera in its own layer when the device rotates. */
@media (orientation:landscape) and (max-height:600px) {
  .app.camera-active #shoot {padding:8px 0;}
  .app.camera-active #snap {width:64px;height:64px;}
  .app.camera-active #snap::after {width:46px;height:46px;}
  .app.camera-active #shoot .buttons>*:is(#cameraPick,#cameraSwitch) {width:44px;height:44px;font-size:23px;}
  .app.camera-active .camera-topbar {top:8px;}
  .app.camera-active .camera-topbar button {min-height:40px;padding:8px 14px;}
  .app.camera-active .camera-logo-overlay:not([hidden]) {top:58px;width:76px;max-height:68px;right:12px;}
}

/* ④投稿: 文面を広く確認し、編集ボタンを常時表示する。 */
.app.editing:has(#post:not([hidden])) > .preview {flex:1 1 45%!important;}
.app.editing:has(#post:not([hidden])) > #editReview:not([hidden]) {flex:1 1 55%!important;min-height:120px;padding:14px 16px!important;}
.app.editing:has(#post:not([hidden])) #threadPreview article {padding:0;border:0;background:transparent;}
.app.editing:has(#post:not([hidden])) #threadPreview article > strong {display:none;}
.app.editing:has(#post:not([hidden])) #threadPreview article > p {font-size:16px;line-height:1.6;margin:10px 0;white-space:pre-wrap;}
.app.editing:has(#post:not([hidden])) > .flow-next.post-flow-actions:not([hidden]) {display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1.6fr);gap:9px;}
.app.editing .post-flow-actions .buttons {grid-column:1/-1;}
.app.editing .post-flow-actions #editPostDirect {order:1;min-width:0;min-height:52px;}
.app.editing .post-flow-actions #send {order:2;min-width:0;font-size:17px;}
.app.editing.post-sheet-open:has(#post:not([hidden])) > #editReview:not([hidden]) {min-height:56px;}
@media (max-height:600px) {.app.editing:has(#post:not([hidden])) > #editReview:not([hidden]) {min-height:56px;}}
