/* Original illustration pixels are shared by cards and scene layers. */
.illustration-crop{display:block;width:100%;height:100%;overflow:hidden}.intro-mascot>*,.guide-character>*,.mascot-row button>*,.buddy>*{width:100%;height:100%;object-fit:contain}.intro-mascot{display:grid;place-items:center}.mascot-row button{min-width:43px}.mini-card .buddy{display:block;width:23px;height:23px;top:3px;right:3px}.file-action{width:58px;min-width:58px;height:51px;display:flex;flex-direction:column;justify-content:center;gap:3px;padding:5px}.file-action svg{width:20px;height:20px}.file-action span{font-size:10px;line-height:1}.series-art .art{height:100%}.activity-preview{display:flex;gap:10px;align-items:center;background:#edf4f7;border:1px solid #d5e4ec;border-radius:10px;padding:8px 12px;margin:0 0 14px}.activity-preview>span{width:42px;height:42px;flex:none}.activity-preview>span>*{width:100%;height:100%;object-fit:contain}.activity-preview strong{font-size:13px}.activity-preview p{font-size:12px;margin:2px 0;line-height:1.4}.preview-head{align-items:center}.preview-head #layout-toggle{margin-left:auto}.painted-poster>.poster-hint{margin-bottom:2%}.scene-frame{flex:1;min-height:0;display:flex;align-items:stretch;justify-content:center;width:100%;overflow:hidden}.painted-poster .painted-scene{flex:none;width:auto;height:100%;aspect-ratio:3/4;max-width:100%;border-radius:3px;overflow:hidden}.painted-background{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none;z-index:-1}.painted-scene .scene-object{transform:translate(-50%,-100%);display:block;gap:0;max-height:none;touch-action:pan-y}.painted-scene .scene-object .art{width:100%;height:100%;min-height:0;display:flex;align-items:flex-end}.painted-scene .scene-object .art>img,.painted-scene .scene-object .art>svg{object-fit:contain;width:100%;height:100%}.painted-scene .scene-label{position:absolute;top:calc(100% + 1px);left:50%;transform:translateX(-50%);max-height:none;max-width:140%;width:max-content;font-size:clamp(7px,1.05vw,12px);padding:1px 5px;background:#fffdf5df;border-radius:3px;line-height:1.1;box-shadow:none;text-align:center}.painted-scene .number-visual{height:100%;grid-template-rows:34% 66%}.painted-scene .number-visual .number{font-size:clamp(18px,2.8vw,38px);text-shadow:0 1px 0 white}.painted-scene .hands{mix-blend-mode:multiply}.painted-scene .own-photo .art{background:white;padding:3px;box-shadow:0 2px 5px #314a5a30}.painted-scene .water-object{opacity:.85}.painted-scene.rearrange .scene-object{cursor:grab;touch-action:none;outline:1px dashed #4c6f8455}.painted-scene.rearrange .scene-object:active{cursor:grabbing}.guide-character{width:16%;height:55px;display:block;flex:none}.poster-guide{gap:10px}.poster-guide>div{min-width:0}.choice-grid>.select-card .art{height:115px}.choice-grid .select-card .number-visual .number{font-size:31px;line-height:1}.choice-grid .select-card .number-visual{grid-template-rows:34% 66%}.choice-grid .select-card>span{display:block;min-height:28px;line-height:1.3;margin-top:5px}.select-card{overflow:hidden}.select-card .art>svg{overflow:hidden!important}#visual-options .button-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}#visual-options button{font-size:11px;padding:6px 4px}.scene-floor-guide{position:absolute;left:70%;top:95%;width:23%;height:19%;transform:translate(-50%,-100%);pointer-events:none}.scene-floor-guide>*{width:100%;height:100%;object-fit:contain}.floor-companion .poster-guide .guide-character{display:none}.floor-companion .poster-guide{min-height:7%}
@media(max-width:600px){.painted-scene .scene-label{font-size:7px}.guide-character{height:35px}.poster-guide p{font-size:8px}.activity-preview{margin-top:5px}.activity-preview>span{width:34px;height:34px}.preview-head #layout-toggle{font-size:11px}.choice-grid>.select-card .art{height:105px}.choice-grid .select-card .number-visual .number{font-size:29px}}
@media print{.painted-scene .scene-object{outline:0!important}.activity-preview{display:none}}
.illustration-crop{display:flex;align-items:center;justify-content:center;container-type:normal;min-width:0;min-height:0}.sprite-viewport{display:block;flex:none;position:relative;overflow:hidden;width:100%;height:100%}.sprite-viewport>img{position:absolute;max-width:none!important;max-height:none!important;object-fit:fill;pointer-events:none}.choice-grid button>.art{height:80px}.series-art .illustration-crop{height:100%}

#gallery-preview{width:min(1580px,97vw);max-width:97vw;height:94vh;max-height:94vh;padding:0;overflow:hidden}#gallery-preview[open]{display:flex;flex-direction:column}#gallery-preview .modal-head{flex:none;padding:12px 20px;margin:0;border-bottom:1px solid #d5e4ec}#gallery-preview .modal-head h2{font-size:18px}#gallery-preview iframe{width:100%;height:100%;flex:1;min-height:0;border:0}.gallery-open{border-color:#4c6f84;background:#e3edf3;font-weight:600}@media(max-width:600px){#gallery-preview{width:98vw;max-width:98vw;height:96vh;max-height:96vh}#gallery-preview .modal-head{padding:8px 12px}#gallery-preview .modal-head h2{font-size:16px}}

.sprite-viewport,.sprite-cutout{overflow:hidden!important}.sprite-viewport{max-width:100%;max-height:100%;vertical-align:middle}

/* The monochrome scene uses its own lighter artwork; foreground contrast stays intact. */
.mono .painted-scene{background:#fff}.mono .painted-background[data-background-mode=quiet]{opacity:.72}
