/* Structured dashboard rows keep their own layout instead of generic button geometry. */
body:has(#app#app#app#app.nfc-package-one) #owner-main .nc-automation-rows article{display:grid!important;grid-template-columns:minmax(0,1fr) 44px!important;align-items:center!important;gap:20px!important;padding:12px 20px!important;min-width:0}
body:has(#app#app#app#app.nfc-package-one) #owner-main .nc-automation-rows article>button[data-na-edit]{display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center!important;justify-items:start!important;gap:5px!important;min-width:0!important;width:100%!important;min-height:64px!important;padding:10px 0!important;margin:0!important;text-align:left!important;border:0!important;border-radius:0!important;background:transparent!important;background-image:none!important;box-shadow:none!important;transform:none!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main .nc-automation-rows article>button[data-na-edit] :is(strong,small){display:block!important;width:100%;text-align:left!important;white-space:normal!important;overflow-wrap:anywhere;word-break:normal}
body:has(#app#app#app#app.nfc-package-one) #owner-main .nc-automation-rows strong{font-size:14px!important;line-height:1.45!important;font-weight:600!important;color:#29313a}
body:has(#app#app#app#app.nfc-package-one) #owner-main .nc-automation-rows small{font-size:12px!important;line-height:1.55!important;font-weight:400!important;color:#737c85}
body:has(#app#app#app#app.nfc-package-one) #owner-main .nc-automation-rows article>label.tapo-switch{width:44px!important;min-width:44px!important;max-width:44px!important;padding:0!important;margin:0!important;align-self:center!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main .nc-group-entry{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;width:100%!important;max-width:100%!important;min-height:76px!important;padding:16px 18px!important;column-gap:16px!important;justify-content:stretch!important;justify-items:start!important;text-align:left!important;align-items:center!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main .nc-group-entry :is(strong,span){min-width:0;white-space:normal;overflow-wrap:anywhere;text-align:left!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main .nc-group-entry b{justify-self:end;align-self:center}
body:has(#app#app#app#app.nfc-package-one) #owner-main :is(.nfc-editor,.nfs-editor,.nfc-heading,.panel-head)>div{min-width:0}
@media(max-width:600px){
body:has(#app#app#app#app.nfc-package-one) #owner-main .nc-automation-rows article{padding:12px 14px!important;gap:14px!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main .nc-automation-rows article>button[data-na-edit]{min-height:64px!important}
}

body:has(#app#app#app#app.nfc-package-one) #owner-main .nfl-stepper{width:134px!important;min-width:134px!important;flex:0 0 134px!important;box-sizing:border-box!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main .nfl-stepper button{width:44px!important;min-width:44px!important;min-height:44px!important;flex:0 0 44px!important;padding:0!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main .nfl-stepper input{flex:0 0 44px!important;min-width:44px!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main #np-automation .field:has(.nfl-stepper){gap:12px!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main #np-automation .field:has(.nfl-stepper)>label{min-width:0;overflow-wrap:anywhere}
body:has(#app#app#app#app.nfc-package-one) #owner-main .nc-sim-history button.secondary{display:grid!important;grid-template-columns:minmax(0,1fr) auto 16px!important;gap:12px!important;width:100%!important;justify-content:stretch!important;justify-items:start!important;align-items:center!important;text-align:left!important;border:0!important;border-bottom:1px solid #edf0f2!important;border-radius:0!important;background:transparent!important;padding:14px 0!important;box-shadow:none!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main .nc-sim-history button :is(span,small){min-width:0;white-space:normal;overflow-wrap:anywhere;text-align:left!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main .nc-sim-history button>b{justify-self:end}
body:has(#app#app#app#app.nfc-package-one) #owner-main .np2-build-options>button{display:flex!important;justify-content:flex-start!important;align-items:center!important;text-align:left!important;gap:16px!important;padding:16px!important;width:100%!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main .np2-build-options>button>span:first-of-type{flex:1;min-width:0;overflow-wrap:anywhere}
@media(max-width:600px){
body:has(#app#app#app#app.nfc-package-one) #owner-main .nc-sim-history button.secondary{grid-template-columns:minmax(0,1fr) 16px!important;gap:6px 12px!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main .nc-sim-history button>small{grid-column:1;grid-row:2;max-width:100%!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main .nc-sim-history button>b{grid-column:2;grid-row:1/3}
}

body:has(#app#app#app#app.nfc-package-one) #owner-main .nc-group-entry strong{font-size:14px!important;line-height:1.45!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main .nc-group-entry>span{font-size:12px!important;font-weight:400!important;line-height:1.55!important;color:#737c85}

/* Automation settings and email preview share the list page spacing. */
body:has(#app#app#app#app.nfc-package-one) #owner-main .np-automation-editor{grid-template-columns:minmax(0,1fr) 360px!important;gap:24px!important;align-items:start!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main #np-automation{min-width:0;display:flex;flex-direction:column;gap:16px}
body:has(#app#app#app#app.nfc-package-one) #owner-main #np-automation>.np-rule-section{margin:0!important;padding:20px!important;border-radius:12px!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main #np-automation .np-rule-section h3{margin:0 0 16px!important;font-size:14px!important;line-height:1.45!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main #np-automation .np-rule-section p{font-size:13px!important;line-height:1.65!important;margin:10px 0 0!important;overflow-wrap:anywhere}
body:has(#app#app#app#app.nfc-package-one) #owner-main #np-automation .field{min-width:0;margin:16px 0 0!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main #np-automation .field:has(.nfl-stepper){margin:16px 0 0!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main #np-automation [hidden]{display:none!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main .np-reward-types{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;min-width:0;padding:0!important;margin:0 0 16px!important;border:0!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main .np-reward-types label{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:7px!important;min-height:44px;min-width:0;padding:9px 10px!important;border:1px solid #e5e7e9!important;border-radius:8px!important;background:#fff!important;font-size:12px!important;line-height:1.4!important;cursor:pointer;overflow-wrap:anywhere}
body:has(#app#app#app#app.nfc-package-one) #owner-main .np-reward-types label:has(input:checked){border-color:#dc7965!important;background:#fff5f1!important;color:#a53e29!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main .np-reward-types input{flex:none;margin:0!important;accent-color:#e85337}
body:has(#app#app#app#app.nfc-package-one) #owner-main #np-automation>.actions{position:sticky;bottom:12px;z-index:6;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;width:100%;padding:12px!important;background:#fff!important;border:1px solid #e5e7e9;border-radius:12px;box-sizing:border-box;box-shadow:0 3px 12px #00000008}
body:has(#app#app#app#app.nfc-package-one) #owner-main #np-automation>.actions button{width:100%!important;min-width:0!important;min-height:44px!important;font-size:13px!important;white-space:normal;text-align:center}
body:has(#app#app#app#app.nfc-package-one) #owner-main .np-email-preview{padding:20px!important;border-radius:12px!important;top:16px!important;min-width:0;margin:0!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main .tapo-email-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
body:has(#app#app#app#app.nfc-package-one) #owner-main .tapo-email-toolbar h3{margin:0!important;font-size:14px!important;min-width:0}
body:has(#app#app#app#app.nfc-package-one) #owner-main .tapo-email-toolbar button{flex:none;min-height:44px!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main .np-email-preview .tapo-email-frame{height:clamp(440px,calc(100dvh - 280px),640px);border:1px solid #e9e6e2;border-radius:10px;background:#fff8f1}
body:has(#app#app#app#app.nfc-package-one) #owner-main .tapo-email-placeholder{padding:32px 20px;margin:0!important;border:1px dashed #ded9d3;border-radius:10px;color:#74706a;text-align:center;font-size:13px;line-height:1.6}
body:has(#app#app#app#app.nfc-package-one) #owner-main .np-email-preview .np-delivery-state{font-size:12px!important;line-height:1.6!important;margin:14px 0 0!important;color:#77716c}
body:has(#app#app#app#app.nfc-package-one) #owner-main .np-email-preview .nc-test-email{padding:16px 0 0!important;margin:16px 0 0!important;border:0!important;border-top:1px solid #e9e7e4!important;border-radius:0!important;box-shadow:none!important;background:transparent!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main .nc-test-email h3{font-size:14px!important;margin:0 0 8px!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main .nc-test-email p{font-size:12px!important;line-height:1.6!important;margin:0 0 12px!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main .nc-test-email button{width:100%!important;min-height:44px!important}
body:has(#app#app#app#app.nfc-package-one) #flow-modal .flow-modal:has(.np-email-dialog){width:min(740px,100%)!important;max-width:100%!important;max-height:calc(100dvh - 24px)!important;overflow:auto!important;padding:24px!important;box-sizing:border-box!important}
body:has(#app#app#app#app.nfc-package-one) .np-email-dialog h2{padding-right:48px;overflow-wrap:anywhere;line-height:1.4}
body:has(#app#app#app#app.nfc-package-one) .np-email-dialog>p{font-size:13px;line-height:1.6;overflow-wrap:anywhere}
body:has(#app#app#app#app.nfc-package-one) #flow-modal .np-email-dialog .tapo-email-frame{display:block;width:100%!important;max-width:600px!important;height:640px!important;max-height:65dvh!important;margin:16px auto 0!important;border:1px solid #e9e6e2;border-radius:10px}
@media(max-width:1180px){
body:has(#app#app#app#app.nfc-package-one) #owner-main .np-automation-editor{grid-template-columns:minmax(0,1fr)!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main .np-email-preview{position:static!important;width:min(100%,640px);box-sizing:border-box;justify-self:center}
body:has(#app#app#app#app.nfc-package-one) #owner-main .np-email-preview .tapo-email-frame{height:620px}
}
@media(max-width:600px){
body:has(#app#app#app#app.nfc-package-one) #owner-main #np-automation>.np-rule-section,body:has(#app#app#app#app.nfc-package-one) #owner-main .np-email-preview{padding:16px!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main .np-reward-types label{padding:9px 7px!important;gap:5px!important}
body:has(#app#app#app#app.nfc-package-one) #owner-main #np-automation>.actions{bottom:8px;padding:10px!important}
body:has(#app#app#app#app.nfc-package-one) #flow-modal .flow-modal:has(.np-email-dialog){padding:16px!important}
}

body:has(#app#app#app#app.nfc-package-one) .np-email-dialog :is(h3,p){min-width:0;overflow-wrap:anywhere}
/* Keep the game form's save button and preview link on the same baseline. */
body #app#app#app#app#app#app.nfc-package-one #owner-main #nfc-game>.actions{display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:8px!important;margin:20px 0 0!important;padding:0!important}
body #app#app#app#app#app#app.nfc-package-one #owner-main #nfc-game>.actions>:is(button,a.button){box-sizing:border-box!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 auto!important;width:auto!important;max-width:100%!important;min-width:0!important;height:44px!important;min-height:44px!important;margin:0!important;padding:10px 16px!important;border-radius:8px!important;font-size:13px!important;line-height:20px!important;text-align:center!important;white-space:nowrap!important}
@media(max-width:480px){body #app#app#app#app#app#app.nfc-package-one #owner-main #nfc-game>.actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}body #app#app#app#app#app#app.nfc-package-one #owner-main #nfc-game>.actions>:is(button,a.button){width:100%!important;padding:10px 12px!important}}
@media(max-width:380px){body #app#app#app#app#app#app.nfc-package-one #owner-main #nfc-game>.actions{grid-template-columns:minmax(0,1fr)!important}}
.instagram-oauth-panel{display:grid;gap:12px}.instagram-oauth-panel>a.button{width:max-content;max-width:100%;text-decoration:none}.instagram-connected{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;padding:14px;border:1px solid #dce8e2;border-radius:14px;background:#f5faf7}.instagram-connected strong{color:#176b45}.instagram-connected .muted{flex:1 1 220px}

/* Keep the Instagram connection card aligned with the owner social editor. */
#owner-main #instagram-connect-card{gap:12px;padding:20px;align-content:start}
#owner-main #instagram-connect-card>h2{margin:0!important;font-size:18px!important;line-height:1.4!important}
#owner-main #instagram-connect-card>p{margin:0!important;font-size:13px!important;line-height:1.6!important}
#owner-main #instagram-connect-card>#instagram-oauth-status{font-size:13px;line-height:1.6;overflow-wrap:anywhere}
#owner-main #instagram-connect-card>a.button{min-height:44px;margin:0!important}
@media(max-width:600px){#owner-main #instagram-connect-card{padding:18px;gap:10px}#owner-main #instagram-connect-card>a.button{width:100%;box-sizing:border-box}}
