* { box-sizing: border-box; }
.pdm-studio { --studio-accent: #d84315; --studio-ink: #252b30; --studio-muted: #697477; --studio-line: #e1e5e5; --studio-green: #28705b; margin: 0; color: var(--studio-ink); background: #f2f4f4; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-size: 13px; letter-spacing: 0; }
.pdm-studio button, .pdm-studio input, .pdm-studio select, .pdm-studio textarea { font: inherit; letter-spacing: 0; }
.pdm-studio button, .pdm-studio a, .pdm-studio input, .pdm-studio select, .pdm-studio textarea { -webkit-tap-highlight-color: transparent; }
.pdm-studio button { cursor: pointer; }
.pdm-studio button:disabled { cursor: default; opacity: .4; }
.pdm-studio button:focus-visible, .pdm-studio a:focus-visible, .pdm-studio input:focus-visible, .pdm-studio select:focus-visible, .pdm-studio textarea:focus-visible { outline: 2px solid var(--studio-accent); outline-offset: 3px; }
.pdm-studio [hidden] { display: none !important; }
.studio-app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.studio-header { min-height: 74px; flex-shrink: 0; display: flex; align-items: center; gap: 18px; padding: 12px 22px; border-bottom: 1px solid var(--studio-line); background: #fff; z-index: 20; }
.icon-button { width: 36px; height: 36px; flex-shrink: 0; border: 0; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; color: inherit; background: transparent; text-decoration: none; font-size: 14px; }
.icon-button:hover, .zoom-label:hover { background: #edf1ef; }
.icon-button[aria-pressed="true"] { background: #e2efe9; color: #1f614e; }
.icon-button.danger:hover { background: #fff0ee; color: #bf3325; }
.studio-back { border: 1px solid var(--studio-line); }
.studio-brand { color: var(--studio-accent); text-decoration: none; font-family: Georgia, serif; font-size: 19px; font-weight: 700; white-space: nowrap; }
.studio-brand span { color: #252b30; }
.studio-brand small { display: block; color: var(--studio-muted); font: 600 9px 'Plus Jakarta Sans', sans-serif; margin-top: 4px; }
.studio-document { border-left: 1px solid var(--studio-line); padding-left: 20px; min-width: 0; flex: 1; }
.studio-document h1 { font-size: 13px; font-weight: 600; margin: 0 0 5px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.studio-document span { font-size: 11px; color: var(--studio-muted); }
.studio-header-actions { display: flex; gap: 5px; align-items: center; }
.studio-primary, .studio-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 40px; padding: 10px 16px; border-radius: 5px; border: 1px solid transparent; font-weight: 600; text-decoration: none; font-size: 12px; }
.studio-primary { color: #fff; background: var(--studio-accent); }
.studio-primary:hover { filter: brightness(.93); }
.studio-secondary { color: var(--studio-ink); background: #fff; border-color: var(--studio-line); }
.studio-secondary:hover { background: #f3f6f4; }
.full-width { width: 100%; margin-top: 12px; }
.studio-main { display: grid; grid-template-columns: 76px 296px minmax(0, 1fr); flex: 1; min-height: 0; }
.sheet-backdrop { display: none; }
.studio-pages { height: 58px; flex: 0 0 58px; display: flex; align-items: center; gap: 8px; padding: 6px 16px; border-bottom: 1px solid var(--studio-line); background: #fff; min-width: 0; }
.studio-page-list { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; }
.studio-page-tab { flex: 0 0 180px; height: 38px; padding: 8px 12px; border: 1px solid var(--studio-line); border-radius: 5px; background: #fff; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px !important; }
.studio-page-tab[aria-selected="true"] { border-color: var(--studio-accent); background: #fff3ed; }
.studio-page-actions { display: flex; gap: 5px; flex-shrink: 0; }
.panel-content { min-height: 0; touch-action: pan-y; overscroll-behavior-y: contain; }
.import-font{padding:10px 0;border-bottom:1px solid #e2e7e5;font-size:12px;overflow-wrap:anywhere}.import-font label{display:flex;align-items:center;gap:8px;margin:10px 0;font-size:11px}.import-font input[type="file"]{max-width:100%;font-size:11px}.import-font button{margin-top:8px;font-size:11px}
.supply-theme { font-size: 13px; margin: 0 0 14px; line-height: 1.5; }
.studio-supply { display: grid; grid-template-columns: 74px minmax(0,1fr); gap: 12px; border-bottom: 1px solid var(--studio-line); padding: 14px 0; }
.studio-supply > a { display: flex; align-items: center; justify-content: center; height: 82px; background: #f6f7f7; }
.studio-supply img { width: 100%; height: 100%; object-fit: contain; }
.studio-supply h4 { font-size: 11px; line-height: 1.5; font-weight: 600; margin: 0 0 6px; overflow-wrap: anywhere; }
.studio-supply h4 a { color: var(--studio-ink); text-decoration: none; }
.studio-supply strong { font-size: 15px; }
.studio-supply del { color: var(--studio-muted); font-size: 10px; margin-left: 6px; }
.supply-shop-link { display: flex; align-items: center; gap: 8px; color: var(--studio-accent); font-size: 11px; font-weight: 600; text-decoration: none; margin-top: 8px; }
@media (max-width: 800px) { .studio-pages { padding: 4px 8px; height: 48px; flex-basis: 48px; } .studio-page-tab { flex-basis: 150px; } .studio-page-actions .studio-secondary { width: 38px; padding: 8px; } .studio-page-actions .studio-secondary span { display: none; } }
.studio-rail { background: #fff; border-right: 1px solid var(--studio-line); padding: 12px 5px; display: flex; flex-direction: column; align-items: stretch; gap: 5px; overflow-y: auto; }
.studio-tool { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 13px 2px; border: 0; border-radius: 5px; background: transparent; color: var(--studio-muted); min-height: 65px; font-size: 10px; font-weight: 600; }
.studio-tool i { font-size: 17px; }
.studio-tool:hover { color: var(--studio-accent); background: #f6f7f6; }
.studio-tool.active { background: #eef4f0; color: var(--studio-green); }
.studio-panel { min-height: 0; display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--studio-line); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 22px 20px 17px; flex-shrink: 0; border-bottom: 1px solid var(--studio-line); }
.panel-heading h2 { font-size: 15px; margin: 0; font-weight: 700; }
.panel-content { overflow-y: auto; padding: 20px; scrollbar-width: thin; flex: 1; }
.pdm-studio label { display: block; color: #46514f; font-size: 11px; font-weight: 600; margin-bottom: 15px; }
.pdm-studio input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), .pdm-studio textarea, .pdm-studio select { display: block; width: 100%; min-width: 0; border: 1px solid #dce2df; border-radius: 5px; min-height: 38px; padding: 9px 10px; background: #fff; color: #263b32; margin-top: 7px; font-size: 12px; font-weight: 400; }
.pdm-studio textarea { resize: vertical; line-height: 1.5; }
.pdm-studio input[type="range"] { width: 100%; margin-top: 12px; accent-color: var(--studio-green); }
.pdm-studio input[type="color"] { width: 35px; height: 32px; padding: 3px; border: 1px solid #dce2df; border-radius: 4px; background: #fff; cursor: pointer; }
.pdm-studio input[type="checkbox"], .pdm-studio input[type="radio"] { accent-color: var(--studio-accent); }
.pdm-studio .checkbox-label { display: flex; align-items: center; gap: 8px; }
.panel-section { border-top: 1px solid var(--studio-line); padding-top: 18px; margin-top: 22px; }
.panel-section h3 { font-size: 11px; font-weight: 700; margin: 0 0 15px; }
.two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.search-field { position: relative; margin-bottom: 12px !important; }
.search-field i { position: absolute; top: 14px; left: 11px; color: #84938b; }
.search-field input { padding-left: 32px !important; }
.asset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.asset-button { min-width: 0; height: 92px; padding: 8px 5px 6px; background: #fff; border: 1px solid var(--studio-line); border-radius: 5px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 5px; }
.asset-button:hover { border-color: var(--studio-green); background: #f5f9f6; }
.asset-button img, .asset-button svg { width: 100%; height: 53px; object-fit: contain; overflow: hidden; }
.asset-button .asset-atlas { display:block; width:53px; height:53px; flex:0 0 53px; background-repeat:no-repeat; }
.asset-button span { font-size: 9px; line-height: 1.3; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty-assets { grid-column: 1 / -1; color: var(--studio-muted); line-height: 1.6; }
.text-preset-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.text-preset { min-width: 0; height: 92px; border: 1px solid var(--studio-line); background: #fff; border-radius: 5px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 8px; }
.text-preset:hover { border-color: var(--studio-green); }
.text-preset strong { font-size: 18px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.text-preset span { color: var(--studio-muted); font-size: 9px; }
.gold-style-sample { -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 1px 0 #77501c); }
.range-value-control { display: grid; grid-template-columns: minmax(0,1fr) 70px; gap: 10px; align-items: center; margin-top: 7px; }
.pdm-studio .range-value-control input { margin-top: 0; min-width: 0; }
.pdm-studio .range-value-control input[type="number"] { padding: 7px 6px; width: 100%; }
.text-master-dialog { width: 400px; }
.text-master-editor .check-label { display: none; }
.text-master-editor #masterPreviewBackground { width: 100%; height: 40px; padding: 4px; }
.text-master-body { padding: 18px 20px; }
.text-master-body label { display: block; margin-bottom: 14px; font-size: 12px; }
.text-master-body input:not([type="checkbox"]), .text-master-body select { display: block; width: 100%; padding: 9px; margin-top: 7px; border: 1px solid var(--studio-line); border-radius: 4px; }
.wording-list { display: flex; flex-direction: column; gap: 6px; }
.wording-list button { min-height: 37px; padding: 9px; text-align: left; background: #f5f7f5; border: 0; border-radius: 4px; font-size: 11px; }
.wording-list button:hover { background: #e9f1ea; }
.upload-zone { position: relative; min-height: 155px; border: 1px dashed #a8bbb0; background: #f6f9f7; border-radius: 5px; display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 12px; cursor: pointer; }
.upload-zone i { font-size: 26px; color: var(--studio-green); }
.upload-zone span { font-weight: 400; color: var(--studio-muted); }
.upload-zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.segmented { display: flex; background: #f2f5f3; padding: 3px; border-radius: 5px; gap: 3px; }
.segmented button { flex: 1; border: 0; background: #fff; border-radius: 3px; padding: 8px 3px; font-size: 10px; }
.layer-row { display: flex; align-items: center; min-height: 49px; gap: 4px; border-bottom: 1px solid #eef0ee; }
.layer-row.is-selected { background: #edf5ef; }
.layer-name { flex: 1; min-width: 0; padding: 10px 6px; text-align: left; border: 0; background: transparent; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.layer-row .icon-button { width: 28px; height: 30px; font-size: 11px; }
.object-actions { display: flex; justify-content: space-between; }
.studio-workspace { display: flex; flex-direction: column; position: relative; min-width: 0; min-height: 0; }
.canvas-toolbar { flex-shrink: 0; min-height: 53px; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 22px; background: #f9fbfa; border-bottom: 1px solid var(--studio-line); }
.history-tools, .zoom-tools { display: flex; align-items: center; gap: 3px; }
.toolbar-divider { height: 18px; width: 1px; background: #dce2df; margin: 0 12px; }
#canvasDimensions { font-size: 10px; color: var(--studio-muted); }
.zoom-label { width: 53px; height: 34px; border: 0; border-radius: 4px; background: transparent; font-size: 11px; }
.context-toolbar { flex: 0 0 51px; height: 51px; min-height: 51px; display: flex; justify-content: center; align-items: center; padding: 6px 12px; gap: 5px; overflow-x: auto; overflow-y: hidden; background: #fff; border-bottom: 1px solid var(--studio-line); }
.context-toolbar select { width: 155px; min-width: 110px; height: 34px; margin: 0; min-height: 34px; font-size: 11px; padding: 6px; }
.context-toolbar #fontSize { width: 61px; min-width: 55px; margin: 0; height: 34px; min-height: 34px; padding: 6px; }
.context-toolbar .icon-button { width: 30px; height: 32px; font-size: 12px; }
.theme-swatches { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.theme-swatch { width:28px; height:28px; flex:0 0 28px; border-radius:50%; border:2px solid #fff; box-shadow:0 0 0 1px #cbd2d2; }
.canvas-stage { flex: 1; min-height: 0; position: relative; overflow: auto; display: grid; place-items: center; padding: 26px; overscroll-behavior: contain; }
.canvas-artboard { flex-shrink: 0; background: white; box-shadow: 0 8px 32px #172d211c, 0 0 0 1px #24342a10; }
.canvas-artboard canvas { touch-action: none; }
.canvas-loading { position: absolute; inset: 0; display: grid; place-items: center; background: #f2f4f4; color: var(--studio-muted); }
.studio-purchase { min-height: 73px; display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 12px 24px; background: #fff; border-top: 1px solid var(--studio-line); flex-shrink: 0; }
.purchase-info { display: flex; align-items: center; gap: 24px; min-width: 0; }
.format-options { display: flex; gap: 12px; }
.format-options label { margin: 0; display: flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 11px; cursor: pointer; }
.purchase-price { display: flex; align-items: center; gap: 10px; }
.purchase-price strong { font-size: 19px; }
.purchase-price span { font-size: 10px; color: var(--studio-green); }
.admin-status { display: flex; gap: 8px; align-items: center; font-size: 11px; color: var(--studio-green); }
.purchase-note { font-size: 10px; color: var(--studio-muted); }
.mobile-purchase, .sheet-close { display: none; }
.studio-dialog { padding: 0; border: 0; border-radius: 8px; background: #fff; box-shadow: 0 24px 90px #102c2440; max-width: min(92vw, 580px); color: var(--studio-ink); }
.studio-dialog::backdrop { background: #13271f85; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; border-bottom: 1px solid var(--studio-line); }
.dialog-heading h2 { font-size: 14px; margin: 0; }
.preview-image-wrap { background: #edf1ee; padding: 22px; text-align: center; }
.preview-image-wrap img { display: block; max-width: 100%; max-height: 62dvh; width: auto; height: auto; margin: auto; box-shadow: 0 4px 16px #0002; }
.dialog-footer { padding: 15px 20px; display: flex; justify-content: flex-end; gap: 10px; }
.login-dialog { width: 415px; padding: 32px; }
.login-exit { position: absolute; top: 12px; right: 12px; color: var(--studio-muted); }
.login-mark { width: 47px; height: 47px; border-radius: 8px; background: #e8f4eb; color: #218855; display: grid; place-items: center; font-size: 28px; margin-bottom: 22px; }
.login-eyebrow { color: var(--studio-muted); font-size: 9px; font-weight: 700; }
.login-dialog h2 { font-size: 24px; line-height: 1.4; margin: 10px 0; font-weight: 700; }
.login-dialog p { color: var(--studio-muted); font-size: 12px; line-height: 1.7; margin: 10px 0 22px; }
.phone-input { display: flex; border: 1px solid #dce2df; border-radius: 5px; margin-top: 7px; align-items: center; }
.phone-input span { padding: 0 13px; border-right: 1px solid #dce2df; }
.phone-input input { border: 0 !important; margin: 0 !important; }
.login-privacy { display: block; margin-top: 20px; text-align: center; color: var(--studio-muted); font-size: 9px; line-height: 1.6; }
.inline-message { margin: 14px 0 0 !important; font-size: 11px; line-height: 1.6; color: #a73428 !important; }
.text-button { background: none; border: none; padding: 13px 4px; font-size: 11px; color: var(--studio-green); }
.confirm-dialog { padding: 24px; width: 380px; }
.confirm-dialog h2 { font-size: 17px; }
.confirm-dialog p { font-size: 12px; color: var(--studio-muted); line-height: 1.7; }
.confirm-dialog .dialog-footer { padding: 12px 0 0; }
.studio-toast { position: fixed; bottom: 95px; left: 50%; transform: translateX(-50%); background: #253c32; color: #fff; padding: 13px 20px; border-radius: 5px; font-size: 12px; z-index: 200; max-width: 90vw; box-shadow: 0 6px 20px #0002; }
.draft-banner { position: absolute; left: 50%; bottom: 87px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 6px 10px 6px 16px; background: #fff; border: 1px solid var(--studio-line); border-radius: 5px; z-index: 10; box-shadow: 0 3px 12px #0001; font-size: 11px; white-space: nowrap; }
.draft-banner > button:not(.icon-button) { border: 0; background: transparent; color: var(--studio-accent); font-weight: 700; }
@media (min-width: 1400px) { .studio-main { grid-template-columns: 80px 316px minmax(0, 1fr); } .panel-content { padding: 24px; } }
@media (max-width: 1150px) and (min-width: 801px) { .studio-main { grid-template-columns: 64px 260px minmax(0, 1fr); } .studio-header { gap: 12px; padding: 10px 14px; } .studio-brand { font-size: 16px; } .context-toolbar { justify-content: flex-start; } .studio-document { padding-left: 14px; } .purchase-info { gap: 13px; } }
@media (max-width: 800px) {
    .studio-header { min-height: 60px; padding: 8px 12px; gap: 9px; }
    .studio-brand { font-size: 14px; } .studio-brand small { font-size: 7px; margin-top: 3px; }
    .studio-document { border: 0; padding: 0; } .studio-document h1 { display: none; } .studio-document span { display: block; font-size: 9px; text-align: right; }
    .studio-header-actions { gap: 0; } .studio-header-actions .icon-button { width: 32px; }
    .studio-header-actions a, .desktop-purchase { display: none; }
    .studio-back { width: 29px; height: 32px; }
    .studio-main { display: flex; flex-direction: column-reverse; }
    .studio-rail { flex-shrink: 0; flex-direction: row; border: 0; border-top: 1px solid var(--studio-line); padding: 5px 8px calc(5px + env(safe-area-inset-bottom)); gap: 4px; min-height: 66px; overflow-x: auto; overflow-y: hidden; }
    .studio-tool { flex: 1; min-width: 48px; min-height: 53px; padding: 8px 5px; gap: 6px; font-size: 9px; } .studio-tool i { font-size: 17px; }
    .studio-workspace { flex: 1; }
    .canvas-toolbar { min-height: 44px; padding: 4px 12px; } .canvas-toolbar .icon-button { height: 30px; width: 30px; font-size: 12px; }
    .toolbar-divider { margin: 0 7px; } #canvasDimensions { font-size: 9px; }
    .context-toolbar { flex-basis: 46px; height: 46px; min-height: 46px; padding: 5px 9px; gap: 4px; justify-content: flex-start; scrollbar-width: none; }
    .context-toolbar select { width: 116px; min-width: 116px; font-size: 10px; }
    .context-toolbar .icon-button { width: 30px; }
    .canvas-stage { padding: 18px 14px; }
    .studio-purchase { min-height: 77px; padding: 10px 14px; gap: 8px; }
    .purchase-info { display: block; } .format-options { gap: 12px; margin-bottom: 8px; } .format-options label { font-size: 10px; }
    .purchase-price { gap: 8px; } .purchase-price strong { font-size: 17px; } .purchase-price span { font-size: 9px; }
    .mobile-purchase { display: inline-flex; white-space: nowrap; font-size: 11px; padding: 10px 13px; }
    .purchase-note { display: block; margin-top: 6px; font-size: 9px; }
    .studio-panel { position: fixed; bottom: 0; left: 0; right: 0; z-index: 70; max-height: 72dvh; height: auto; display: none; border: 0; border-top: 1px solid var(--studio-line); border-radius: 8px 8px 0 0; box-shadow: 0 -8px 35px #0002; }
    .studio-panel.open { display: flex; }
    .panel-heading { padding: 12px 18px 8px; } .panel-heading h2 { font-size: 14px; }
    .panel-content { padding: 18px 20px calc(20px + env(safe-area-inset-bottom)); }
    .sheet-close { display: inline-flex; }
    .sheet-backdrop { display: block; position: fixed; inset: 0; border: 0; background: #122a1d66; z-index: 65; }
    .asset-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .text-preset-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .text-preset strong { font-size: 16px; }
    .login-dialog { padding: 27px; } .login-dialog h2 { font-size: 23px; }
    .studio-toast { bottom: 155px; width: max-content; }
    .draft-banner { bottom: 88px; font-size: 10px; }
}
@media (max-width: 360px) { .studio-brand { font-size: 12px; } .studio-document span { font-size: 8px; } .studio-header { gap: 6px; padding: 8px; } .studio-header-actions .icon-button { width: 28px; } .format-options { gap: 7px; } .mobile-purchase { padding: 10px; gap: 7px; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* Date Style Format Dropdown & Pills */
.date-style-group { margin-top: 10px; padding: 10px 12px; background: #f8faf9; border: 1px solid #dce4e0; border-radius: 8px; }
.date-style-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.date-style-title { font-size: 11px; font-weight: 700; color: #264936; display: flex; align-items: center; gap: 5px; }
.date-style-select { width: 100%; font-size: 11px !important; padding: 7px 9px !important; border: 1.5px solid #28705b !important; border-radius: 6px !important; background: #fff !important; color: #1f362a !important; font-weight: 600 !important; cursor: pointer; }
.date-pills-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.date-pill-btn { border: 1px solid #ccd8d2; background: #fff; color: #2d453b; font-size: 10px; font-weight: 600; padding: 4px 8px; border-radius: 12px; cursor: pointer; transition: all 0.15s ease; white-space: nowrap; }
.date-pill-btn:hover { background: #eef5f1; border-color: #28705b; color: #1c5243; }
.date-pill-btn.active { background: #28705b; border-color: #28705b; color: #fff; }

