/* Photo/video typography: editable templates, quiet phrase suggestions. */
.phrase-library{margin:12px 0;border:1px solid #dce0e4;border-radius:12px;background:#fafbfc}
.phrase-library summary{display:flex;justify-content:space-between;gap:10px;padding:12px;cursor:pointer;font-size:14px}
.phrase-library p{margin:0 12px 10px;color:#66707a;font-size:12px;line-height:1.5}
#phraseSuggestions{display:grid;gap:7px;padding:0 12px 12px}
#phraseSuggestions button{padding:11px 12px;border:1px solid #e1e5e9;border-radius:9px;background:#fff;text-align:left;color:#252b31;font:400 14px/1.5 'Noto Serif KR',Georgia,serif;cursor:pointer}
#phraseSuggestions button:hover{border-color:#c36843}
#phraseSuggestions button:focus-visible{outline:2px solid #c36843;outline-offset:2px}
.text-template-button[data-text-template='cinemaTitle'] b{font-family:'Barlow Condensed',sans-serif!important;letter-spacing:.18em!important;font-weight:300!important;font-size:24px!important}
@media(max-width:900px){
  body.has-media[data-editor-tab='text'] #mobileFrameStudio{height:min(250px,29svh)!important}
  body.has-media .text-template-grid{display:flex!important;gap:8px!important;overflow-x:auto!important;overscroll-behavior:auto;touch-action:pan-x pan-y pinch-zoom;padding-bottom:6px}
  body.has-media .text-template-button{flex:0 0 145px;min-height:70px!important}
  body.has-media [data-panel='text'] textarea{font-size:16px!important;min-height:90px}
}
@media(max-width:900px) and (max-height:520px){body.has-media[data-editor-tab='text'] #mobileFrameStudio{height:135px!important}}

/* Direct manipulation in the mobile preview; detailed numeric controls are optional. */
.text-fine-controls{margin-top:8px;border:1px solid #dde2e6;border-radius:10px;padding:0 10px}
.text-fine-controls>summary{padding:11px 0;font-size:13px;font-weight:600;cursor:pointer}
.direct-text-help{margin:8px 0;color:#626d78;font-size:12px;line-height:1.5}
#textLayerEditor>.field-grid{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:7px!important}
#textLayerEditor>.field-grid>.field{grid-column:span 2;min-width:0;margin:0}
#textLayerEditor>.field-grid>.field:first-child{grid-column:span 4}
#textLayerEditor>.field-grid select,#textLayerEditor>.field-grid input{width:100%;min-width:0}
#textLayerEditor>.field>textarea{height:64px!important;min-height:64px!important;resize:vertical}
#textLayerEditor>#textFontRecommendation{display:none}
@media(max-width:900px){
  body.has-media[data-editor-tab='text'] #mobileFrameStudio{height:min(420px,43svh)!important}
  body.has-media[data-editor-tab='text'] #editorLiveCanvas{touch-action:none!important;cursor:grab}
  body.has-media[data-editor-tab='text'] #editorLivePreview{touch-action:none!important}
  body.has-media #textLayerEditor{padding:10px!important}
  body.has-media #textLayerEditor>.field-grid select{height:38px!important;min-height:38px!important;padding:5px 7px!important}
  body.has-media #textLayerEditor .field>span{font-size:12px!important}
  body.has-media .frame-meta-controls .toggle-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.has-media #manualMetadataDetails .manual-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  body.has-media #manualMetadataDetails .manual-grid>.field:nth-child(-n+2){grid-column:1/-1}
  body.has-media #frameMetaControls .brand-controls{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  body.has-media #frameMetaControls .brand-controls>.field:first-child{grid-column:1/-1}
  body.has-media.editor-keyboard-open[data-editor-tab='text'] #mobileFrameStudio{height:clamp(110px,calc(var(--editor-visual-height,400px)*.32),180px)!important}
}
@media(max-width:900px) and (max-height:520px){body.has-media[data-editor-tab='text'] #mobileFrameStudio{height:160px!important}}
