/* Match the article writing module and override the shared fixed-height button reset. */
#tab-notes{--note-line:#e9e5e1;min-width:0;max-width:100%;}
#tab-notes .page-head{flex-wrap:wrap;gap:16px;}
#tab-notes .page-head p{display:none;}
#tab-notes .note-list-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:8px 0 20px;}
#tab-notes .note-list-heading h2{margin:0 0 8px;font-size:16px;}
#tab-notes .note-list-heading p,#tab-notes .note-list-heading>span{margin:0;font-size:12px;line-height:1.7;color:#89919d;}
#tab-notes .note-list-heading>span{flex-shrink:0;}
#tab-notes .note-task-list{display:grid;gap:16px;}
#tab-notes button.note-task-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(330px,.6fr);align-items:start;justify-content:stretch;gap:24px 32px;width:100%;min-width:0;max-width:100%;height:auto;min-height:0;margin:0;padding:24px;border:1px solid var(--note-line);border-radius:12px;background:#fff;box-shadow:0 2px 5px #27334603;text-align:left;white-space:normal;line-height:1.5;font-weight:400;color:#263445;}
#tab-notes button.note-task-row:hover{border-color:#dfb39f;box-shadow:0 5px 16px #654a3710;background:#fffdfb;}
#tab-notes button.note-task-row:focus-visible{outline:2px solid #de795b;outline-offset:3px;}
#tab-notes .note-task-row>.note-task-main{display:flex;flex-direction:column;align-items:flex-start;gap:0;min-width:0;overflow-wrap:anywhere;}
#tab-notes .note-task-top{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px;}
#tab-notes .note-task-id{font-size:11px;color:#989da6;font-variant-numeric:tabular-nums;}
#tab-notes .note-task-platform{padding:3px 8px;border:1px solid #f2e4d8;border-radius:5px;background:#fcf4ee;font-size:11px;color:#a37358;}
#tab-notes .note-task-main>strong{font-size:16px;line-height:1.6;color:#253446;}
#tab-notes .note-task-main>small{margin-top:8px;font-size:12px;color:#89919d;}
#tab-notes .note-task-schedule{margin-top:6px;font-size:12px;color:#89919d;}
#tab-notes .note-task-row>.note-task-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-self:center;gap:20px;padding-left:28px;border-left:1px solid #eeeae5;}
#tab-notes .note-task-metrics>span{min-width:0;}
#tab-notes .note-task-metrics small{display:block;margin:0 0 10px;font-size:12px;color:#89919d;}
#tab-notes .note-task-metrics strong{display:block;font-size:25px;line-height:1.3;font-weight:600;font-variant-numeric:tabular-nums;}
#tab-notes .note-task-metrics em{font-size:12px;font-weight:400;font-style:normal;color:#9199a3;}
#tab-notes .note-task-row>.note-task-bottom{grid-column:1/-1;display:flex;align-items:center;gap:24px;border-top:1px solid #f0ece7;padding-top:18px;font-size:12px;}
#tab-notes .note-task-next{flex:1;min-width:0;color:#798392;overflow-wrap:anywhere;}
#tab-notes .note-task-enter{color:#c97053;font-weight:500;white-space:nowrap;}
#tab-notes .note-task-progress{display:flex;align-items:center;gap:10px;flex:0 0 180px;}
#tab-notes .note-task-progress>[role=progressbar]{display:block;height:6px;flex:1;overflow:hidden;border-radius:10px;background:#f1eeea;}
#tab-notes .note-task-progress i{display:block;height:100%;border-radius:inherit;background:#dc8466;}
#tab-notes .note-task-progress small{margin:0;min-width:30px;font-size:11px;color:#89919d;}
#tab-notes .note-task-row>.error{grid-column:1/-1;font-size:12px;overflow-wrap:anywhere;}
#tab-notes .note-badge,#note-detail-dialog .note-badge{padding:5px 9px;border-radius:4px;font-size:11px;background:#f0f0ef;color:#71717a;}
#tab-notes .note-badge.ready,#tab-notes .note-badge.completed,#tab-notes .note-badge.published,#note-detail-dialog .note-badge.ready,#note-detail-dialog .note-badge.published{background:#edf6ef;color:#35774c;}
#tab-notes .note-badge.images,#tab-notes .note-badge.writing,#tab-notes .note-badge.generating,#note-detail-dialog .note-badge.images,#note-detail-dialog .note-badge.writing{background:#ecf2fc;color:#4f72b2;}
#tab-notes .note-badge.claimed,#tab-notes .note-badge.paused,#note-detail-dialog .note-badge.claimed{background:#fbf0e6;color:#9c7040;}
#tab-notes .note-badge.failed,#note-detail-dialog .note-badge.failed{background:#fbedeb;color:#b45545;}
#tab-notes .note-empty{margin:0;padding:40px 24px;border-radius:12px;color:#89919d;}
#tab-notes .note-empty h2{font-size:16px;color:#536174;}
#tab-notes .note-empty p{font-size:12px;line-height:1.8;}
#tab-notes .note-panel,#tab-notes .note-item{border-color:var(--note-line);border-radius:12px;box-shadow:0 2px 5px #27334603;}
#tab-notes .note-panel h2{font-size:18px;line-height:1.5;color:#253446;}
#tab-notes .note-panel label{font-size:12px;}
#tab-notes .note-fields{align-items:start;}
#tab-notes .note-fields>label{min-width:0;align-content:start;}
#tab-notes .note-fields>label>input:not([type=color]),#tab-notes .note-fields>label>select{height:40px;min-height:40px;margin-top:0;}
#tab-notes .note-panel fieldset{padding:18px 0;border:0;border-top:1px solid var(--note-line);border-radius:0;margin:24px 0;}
#tab-notes .note-panel legend{padding:0 12px 0 0;font-size:13px;}
#tab-notes .note-steps{border-color:var(--note-line);font-size:12px;}
#tab-notes .note-steps .current{color:#b67755;}
#tab-notes .note-style-card:has(input:checked){border-color:#d99477;box-shadow:0 0 0 2px #fcf4ee;}
#tab-notes .note-policy{border:1px solid #eee5da;border-radius:8px;background:#fcf8f3;color:#91795f;font-size:12px;line-height:1.9;}
#tab-notes .note-detail-head{flex-wrap:wrap;}
#tab-notes .note-detail-head p{font-size:12px;line-height:1.8;color:#89919d;}
#tab-notes .note-item-meta small{font-size:12px;color:#89919d;}
#tab-notes .note-item h3{font-size:16px;color:#253446;}
#tab-notes .note-image-status>span,#tab-notes .note-editors label{border-color:var(--note-line);}
#tab-notes .note-style-workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,.6fr);align-items:start;gap:32px;margin-top:12px;}
#tab-notes .note-style-settings{min-width:0;}
#tab-notes .note-color-toolbar{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;}
#tab-notes .note-color-toolbar>label{flex:1;min-width:180px;margin-bottom:0;}
#tab-notes .note-color-toolbar>button{flex-shrink:0;}
#tab-notes .note-color-control{display:flex;align-items:center;gap:12px;padding:6px 12px;border:1px solid var(--note-line);border-radius:8px;background:#fff;}
#tab-notes .note-color-control input[type=color]{width:40px;height:28px;padding:0;border:0;border-radius:4px;background:transparent;flex:0 0 40px;}
#tab-notes .note-color-control input:disabled{opacity:.7;}
#tab-notes .note-color-control>span{font-size:12px;font-variant-numeric:tabular-nums;color:#798392;}
#tab-notes .note-style-settings>.help{margin:4px 0 18px;font-size:12px;line-height:1.8;}
#tab-notes .note-style-settings .note-refs{gap:12px;padding-top:6px;}
#tab-notes .note-style-settings .note-refs img{width:96px;height:110px;}
#tab-notes .note-style-settings .note-refs button{width:28px;height:28px;min-height:28px;padding:0;}
#tab-notes .note-test-options>label,#tab-notes .note-test-options .note-fields>label{margin-block:12px;}
#tab-notes .note-test-options .help{font-size:12px;line-height:1.8;margin-bottom:0;}
#tab-notes .note-style-test{position:sticky;top:24px;min-width:0;padding:20px;border:1px solid #ebe6df;border-radius:12px;background:#faf8f5;}
#tab-notes .note-style-test-head{padding-bottom:16px;margin-bottom:16px;border-bottom:1px solid #e9e5e1;}
#tab-notes .note-style-test-head h3{margin:0 0 6px;font-size:14px;color:#253446;}
#tab-notes .note-style-test-head>span{font-size:11px;line-height:1.6;color:#89919d;}
#tab-notes .note-style-test-head>button{display:flex;width:100%;margin-top:14px;}
#tab-notes .note-test-placeholder{min-height:340px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:24px;border:1px dashed #ded7cf;border-radius:8px;text-align:center;color:#89919d;background:#fffdfb;}
#tab-notes .note-test-placeholder>span{font-size:34px;color:#c6b5a6;}
#tab-notes .note-test-placeholder>strong{font-size:13px;font-weight:500;color:#798392;}
#tab-notes .note-test-placeholder>p{margin:0;font-size:12px;line-height:1.8;}
#tab-notes .note-test-placeholder .note-spinner{width:24px;height:24px;border-color:#f1dfd1;border-top-color:#dc8466;}
#tab-notes .note-test-image{display:block;max-width:360px;margin:0 auto;}
#tab-notes .note-test-image img{display:block;width:100%;height:auto;border-radius:6px;box-shadow:0 4px 16px #654a3710;}
#tab-notes .note-test-caption{display:grid;gap:8px;margin-top:16px;font-size:12px;color:#89919d;overflow-wrap:anywhere;}
#tab-notes .note-test-caption>strong{font-weight:500;color:#536174;}
#tab-notes .note-test-caption>p{margin:0;font-size:12px;line-height:1.8;}
#tab-notes .note-test-caption>a{color:#b97859;}
#tab-notes .note-generation-details,#note-detail-dialog .note-generation-details{margin-top:12px;padding:12px;border:1px solid #e9e5e1;border-radius:8px;background:#fff;font-size:12px;line-height:1.8;color:#798392;overflow-wrap:anywhere;}
#tab-notes .note-generation-details summary,#note-detail-dialog .note-generation-details summary{cursor:pointer;color:#536174;}
#tab-notes .note-generation-details a,#note-detail-dialog .note-generation-details a{display:inline-block;margin-top:10px;color:#b97859;}
#tab-notes .note-generation-details label,#note-detail-dialog .note-generation-details label{display:block;margin-top:10px;}
#tab-notes .note-generation-details textarea,#note-detail-dialog .note-generation-details textarea{width:100%;min-height:140px;margin-top:6px;padding:10px;border:1px solid #e8e4df;border-radius:6px;background:#faf9f7;font-size:12px;line-height:1.7;resize:vertical;}
#tab-notes .note-test-failure{padding:24px 18px;border:1px solid #efd9d4;border-radius:8px;background:#fff7f5;color:#b45545;overflow-wrap:anywhere;}
#tab-notes .note-test-failure strong{font-size:14px;}
#tab-notes .note-test-failure p,#tab-notes .note-test-failure small{font-size:12px;line-height:1.8;}
@media(max-width:1100px){
  #tab-notes button.note-task-row{grid-template-columns:minmax(0,1fr);gap:20px;}
  #tab-notes .note-task-row>.note-task-metrics{padding:18px 0 0;border-left:0;border-top:1px solid #f0ece7;}
  #tab-notes .note-task-row>.note-task-bottom{flex-wrap:wrap;}
  #tab-notes .note-task-next{flex-basis:100%;}
  #tab-notes .note-task-progress{flex:1;}
  #tab-notes .note-style-workspace{grid-template-columns:minmax(0,1fr);gap:24px;}
  #tab-notes .note-style-test{position:static;}
  #tab-notes .note-test-placeholder{min-height:220px;}
}
@media(max-width:700px){
  #tab-notes button.note-task-row{padding:18px;gap:18px;}
  #tab-notes .note-list-heading{flex-wrap:wrap;}
  #tab-notes .note-task-row>.note-task-metrics{gap:12px;}
  #tab-notes .note-task-metrics strong{font-size:21px;}
  #tab-notes .note-task-metrics em{display:block;margin-top:4px;}
  #tab-notes .note-task-row>.note-task-bottom{gap:14px;}
}
#note-detail-dialog{width:min(1180px,calc(100vw - 48px));max-height:calc(100dvh - 40px);overflow:auto;padding:0 28px 28px;overscroll-behavior:contain;}
#note-detail-dialog .note-dialog-head{position:sticky;top:0;z-index:2;align-items:center;min-height:82px;margin:0 -28px 22px;padding:16px 28px;background:#fff;border-bottom:1px solid #edf0f5;}
#note-detail-dialog .note-dialog-head>div{min-width:0;}
#note-detail-dialog .note-dialog-head h2{font-size:18px;line-height:1.45;overflow-wrap:anywhere;}
#note-detail-dialog .note-dialog-head>button{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;min-height:40px;flex:0 0 40px;padding:0;border:1px solid #e3e7ed;border-radius:8px;background:#fff;color:#536174;font-size:20px;line-height:1;}
#note-detail-dialog .note-dialog-head>button:hover{background:#f5f7fa;border-color:#cfd6e0;}
#note-detail-dialog .note-dialog-grid{grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);align-items:start;gap:24px;}
#note-detail-dialog .note-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
#note-detail-dialog .note-gallery>div{min-width:0;}
#note-detail-dialog #note-copy-form .actions{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;}
#note-detail-dialog #note-copy-form .actions>button[data-note-copy]:not([data-note-copy="all"]){grid-column:span 2;}
#note-detail-dialog #note-copy-form .actions>button[data-note-copy="all"],#note-detail-dialog #note-copy-form .actions>button[type="submit"]{grid-column:span 3;}
#note-detail-dialog #note-copy-form .actions>button{min-width:0;min-height:40px;padding:8px;white-space:normal;line-height:1.35;text-align:center;}
#note-detail-dialog .note-policy{margin-top:16px;padding:16px;border:1px solid #e9edf4;background:#f7f8fb;}
#note-detail-dialog .note-policy .actions{gap:8px;}
#note-detail-dialog form{min-width:0;}
@media(max-width:850px){
  #note-detail-dialog{width:calc(100vw - 20px);max-height:calc(100dvh - 20px);padding:0 18px 18px;border-radius:12px;}
  #note-detail-dialog .note-dialog-head{min-height:70px;margin:0 -18px 18px;padding:12px 18px;}
  #note-detail-dialog .note-dialog-grid{grid-template-columns:minmax(0,1fr);gap:18px;}
  #note-detail-dialog #note-copy-form .actions{grid-template-columns:repeat(4,minmax(0,1fr));}
  #note-detail-dialog #note-copy-form .actions>button[data-note-copy="all"]{grid-column:span 2;}
  #note-detail-dialog #note-copy-form .actions>button[type="submit"]{grid-column:1/-1;}
  #note-detail-dialog .note-gallery{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:420px){
  #note-detail-dialog #note-copy-form .actions{grid-template-columns:minmax(0,1fr);}
  #note-detail-dialog #note-copy-form .actions>button[data-note-copy]:not([data-note-copy="all"]),#note-detail-dialog #note-copy-form .actions>button[data-note-copy="all"],#note-detail-dialog #note-copy-form .actions>button[type="submit"]{grid-column:1/-1;}
}
#tab-notes .note-task-edit{max-width:960px;margin-inline:auto;}
#tab-notes .note-task-edit fieldset{margin:24px 0;padding:20px;border:1px solid #e4e9f1;border-radius:12px;}
#tab-notes .note-task-edit legend{padding:0 8px;color:#25344c;font-weight:650;}
#tab-notes .note-task-edit .note-reschedule-toggle{display:flex;align-items:center;gap:10px;margin:16px 0;font-weight:600;}
#tab-notes .note-task-edit input[type=checkbox]{width:16px;height:16px;flex:none;}
#tab-notes .note-schedule-summary{padding:12px 16px;border-radius:8px;background:#eff5ff;color:#28518a;line-height:1.7;}
#tab-notes .note-task-edit>.actions{margin-top:24px;padding-top:20px;border-top:1px solid #edf0f5;}
