#task-modal.task-composer {
  display:flex;
  flex-direction:column;
  top:max(20px, 5vh);
  bottom:auto;
  width:calc(100% - 32px);
  max-width:760px;
  max-height:calc(100vh - 40px);
  max-height:calc(100dvh - 40px);
  left:0;
  right:0;
  padding:0;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:28px;
  background:var(--white);
  box-shadow:0 32px 100px rgba(0,0,0,.23);
  color:var(--black);
}
#task-modal-backdrop { background:rgba(14,16,20,.48); backdrop-filter:blur(8px); }
#task-modal.task-composer:not(.hidden) { animation:composer-enter .32s cubic-bezier(.2,.8,.2,1) both; }
#task-modal .task-modal-head {
  flex:0 0 auto;
  align-items:center;
  gap:14px;
  padding:22px 24px 20px;
  margin:0;
  border-bottom:1px solid var(--line);
}
#task-modal .composer-icon { display:inline-flex; flex:0 0 auto; align-items:center; justify-content:center; }
#task-modal .composer-icon svg { display:block; width:20px; height:20px; }
#task-modal .composer-brand-icon { width:52px; height:56px; border-radius:17px; background:var(--yellow); color:#151515; }
#task-modal .composer-brand-icon svg { width:26px; height:26px; }
#task-modal .composer-heading-copy { min-width:0; flex:1; }
#task-modal .section-kicker { display:block; margin-bottom:5px; color:var(--muted); font-size:10px; letter-spacing:.08em; font-weight:650; }
#task-modal .task-modal-head h2 { margin:0; font-size:24px; font-weight:800; line-height:1.2; letter-spacing:-.035em; overflow-wrap:anywhere; }
#task-modal .composer-subtitle { margin:5px 0 0; color:var(--muted); font-size:11px; line-height:1.5; }
#task-modal .task-modal-close {
  display:grid; place-items:center; flex:0 0 auto; align-self:flex-start;
  width:40px; height:40px; border:1px solid var(--line); border-radius:13px;
  background:var(--soft); color:var(--black); font-size:23px; font-weight:400;
  transition:background-color .18s, transform .18s;
}
#task-modal #task-form { display:flex; flex-direction:column; flex:1 1 auto; min-height:0; overflow:hidden; }
#task-modal .composer-body { display:flex; flex-direction:column; gap:15px; min-height:0; overflow-y:auto; overscroll-behavior-y:contain; padding:20px 24px; scrollbar-width:thin; scrollbar-color:var(--line) transparent; }
#task-modal .composer-section { margin:0; padding:15px; border:1px solid var(--line); border-radius:19px; gap:11px; background:var(--white); }
#task-modal .composer-field-heading { display:flex; align-items:center; gap:8px; min-width:0; font-size:13px; font-weight:750; }
#task-modal .composer-field-heading > .composer-icon { color:var(--muted); }
#task-modal .composer-field-heading > span:not(.composer-icon):not(.composer-text-count) { color:var(--black); font-size:13px; font-weight:750; text-transform:none; letter-spacing:0; }
#task-modal .task-field-row { gap:10px; flex-wrap:wrap; }
#task-modal .task-field-actions { gap:5px; }
#task-modal .task-field-actions button { min-height:32px; padding:6px 10px; border:1px solid transparent; border-radius:10px; background:var(--soft); color:var(--black); font-size:10px; font-weight:650; transition:background-color .18s, transform .18s; }
#task-modal .composer-selection-count { display:block; color:var(--muted); font-size:10px; font-weight:500; line-height:1.4; min-height:14px; text-transform:none; letter-spacing:0; }
#task-modal .composer-selection-count.has-selection { color:var(--black); font-weight:650; }
#task-modal .composer-search { position:relative; }
#task-modal .composer-search > .composer-icon { position:absolute; left:13px; top:50%; transform:translateY(-50%); color:var(--muted); pointer-events:none; }
#task-modal #task-shop-search { height:44px; margin:0; padding:10px 35px 10px 40px; border:1px solid var(--line); border-radius:12px; background:var(--soft); color:var(--black); font:inherit; font-size:12px; transition:border-color .18s, box-shadow .18s; }
#task-modal .task-shop-picker { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-content:start; gap:7px; max-height:196px; min-height:0; overflow-y:auto; overscroll-behavior-y:contain; padding:2px; border:0; border-radius:0; background:transparent; scrollbar-width:thin; scrollbar-color:var(--line) transparent; scroll-padding:4px; }
#task-modal .task-shop-option { min-width:0; min-height:48px; padding:10px; gap:9px; border:1px solid transparent; border-radius:12px; background:var(--soft); cursor:pointer; font-size:11px; line-height:1.4; font-weight:600; transition:border-color .18s, background-color .18s, transform .18s; }
#task-modal .task-shop-option > span { overflow-wrap:anywhere; }
#task-modal .task-shop-option:has(input:checked) { border-color:#e7c132; background:var(--soft-yellow); }
#task-modal .task-shop-option input[type="checkbox"] { flex:0 0 21px; width:21px!important; min-width:21px!important; height:21px!important; border:1.5px solid #a9acb2!important; border-radius:7px!important; background:var(--white)!important; }
:root[data-theme="dark"] #task-modal .task-shop-option input[type="checkbox"] { border-color:#737780!important; }
#task-modal .task-shop-option input[type="checkbox"]:checked { border-color:#d9b300!important; background:var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 10 3 3 7-7' fill='none' stroke='%23151515' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/17px no-repeat!important; }
#task-modal .composer-empty { margin:0; padding:16px; color:var(--muted); text-align:center; font-size:12px; }
#task-modal .composer-description { background:var(--soft); }
#task-modal .composer-text-count { margin-left:auto; color:var(--muted); font-size:10px; font-weight:500; font-variant-numeric:tabular-nums; }
#task-modal #task-form-text { min-height:110px; max-height:250px; padding:13px; border:1px solid var(--line); border-radius:12px; background:var(--white); color:var(--black); font:inherit; font-size:13px; font-weight:450; line-height:1.65; resize:vertical; transition:border-color .18s, box-shadow .18s; }
#task-modal .composer-field-hint { color:var(--muted); font-size:10px; font-weight:450; text-transform:none; letter-spacing:0; line-height:1.5; }
#task-modal .composer-dates { display:grid; grid-template-columns:1fr 1fr; gap:16px; align-items:end; }
#task-modal .composer-created { display:flex; align-items:center; gap:8px; padding-bottom:13px; color:var(--muted); }
#task-modal .task-created-at { font-size:10px; font-weight:500; line-height:1.5; }
#task-modal .task-date-field { margin:0; gap:7px; }
#task-modal .task-date-field > span { font-size:11px; font-weight:650; color:var(--black); text-transform:none; letter-spacing:0; }
#task-modal .task-date-control { position:relative; border-radius:12px; background:var(--soft); }
#task-modal .task-date-control > .composer-icon { position:absolute; top:50%; left:12px; transform:translateY(-50%); color:var(--muted); pointer-events:none; }
#task-modal .task-date-control #task-form-deadline { min-height:44px; font:inherit; font-size:12px; text-align:left; padding:10px 10px 10px 40px!important; color:var(--black); }
#task-modal #task-form-deadline::-webkit-date-and-time-value { text-align:left; }
#task-modal #task-form-deadline::-webkit-datetime-edit { padding:0; }
#task-modal .composer-footer { display:flex; flex:0 0 auto; align-items:center; gap:16px; padding:16px 24px; border-top:1px solid var(--line); background:var(--white); }
#task-modal .composer-footer-note { flex:1; min-width:0; color:var(--muted); font-size:11px; line-height:1.5; }
#task-modal #task-save-button { display:flex; align-items:center; justify-content:center; gap:18px; flex:0 0 auto; width:auto; min-width:240px; min-height:49px; padding:13px 20px; border:1px solid #edc12b; border-radius:14px; background:var(--yellow); color:#141414; font-size:12px; font-weight:750; box-shadow:0 4px 12px rgba(214,173,0,.13); transition:background-color .18s, box-shadow .18s, transform .18s; }
#task-modal #task-save-button::after { content:''; width:18px; height:18px; background:currentColor; mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14m-6-6 6 6-6 6' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }
#task-modal #task-save-button:disabled::after { display:none; }
#task-modal :is(button,input,textarea,select):focus-visible { outline:2px solid var(--yellow)!important; outline-offset:3px; }
#task-modal :is(#task-shop-search,#task-form-text):focus { border-color:#d4ab17; box-shadow:0 0 0 3px rgba(255,212,42,.13); }
#task-modal :is(button,.task-shop-option):active { transform:scale(.98); }
html.task-composer-open { overflow:hidden; }
html.task-composer-open body { overflow:hidden; }
@media (min-width:800px) {
  #task-modal.task-composer { max-width:880px; }
  #task-modal .composer-body { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); grid-template-rows:auto auto; gap:16px; align-items:start; }
  #task-modal .composer-shops { grid-column:1; grid-row:1 / span 2; }
  #task-modal .composer-description { grid-column:2; grid-row:1; }
  #task-modal .composer-dates { grid-column:2; grid-row:2; display:flex; flex-direction:column-reverse; align-items:stretch; gap:14px; }
  #task-modal .composer-created { padding:0; }
  #task-modal .task-shop-picker { grid-template-columns:1fr; max-height:248px; }
  #task-modal #task-form-text { min-height:174px; }
  #task-modal #task-edit-shop-field { grid-column:1; grid-row:1 / span 2; }
}
#task-modal #task-edit-shop-field { margin:0; padding:15px; border:1px solid var(--line); border-radius:19px; }
#task-modal #task-edit-shop { min-height:44px; color:var(--black); font:inherit; font-size:13px; }
@media (hover:hover) and (pointer:fine) {
  #task-modal .task-shop-option:hover { border-color:#e4c756; background:var(--soft-yellow); transform:translateY(-1px); }
  #task-modal .task-field-actions button:hover, #task-modal .task-modal-close:hover { background:var(--soft-yellow); }
  #task-modal #task-save-button:hover:not(:disabled) { background:#ffdc45; transform:translateY(-1px); box-shadow:0 6px 16px rgba(214,173,0,.2); }
}
@media (max-width:600px) {
  #task-modal.task-composer { top:auto; bottom:0; width:100%; max-height:calc(100vh - 16px); max-height:calc(100dvh - max(16px, var(--pulse-safe-top, 0px))); border-radius:26px 26px 0 0; }
  #task-modal .task-modal-head { padding:18px 18px 16px; gap:11px; }
  #task-modal .composer-brand-icon { width:44px; height:48px; border-radius:14px; }
  #task-modal .task-modal-head h2 { font-size:21px; }
  #task-modal .composer-subtitle { font-size:10px; }
  #task-modal .task-modal-close { width:38px; height:38px; border-radius:12px; }
  #task-modal .composer-body { padding:16px; gap:13px; }
  #task-modal .composer-section { padding:12px; border-radius:17px; gap:10px; }
  #task-modal .task-field-actions button { min-height:36px; font-size:10px; padding:7px 9px; }
  #task-modal #task-shop-search, #task-modal #task-form-text, #task-modal .task-date-control #task-form-deadline { font-size:16px; }
  #task-modal .task-shop-picker { grid-template-columns:1fr; max-height:170px; }
  #task-modal .task-shop-option { min-height:49px; padding:11px; font-size:12px; font-weight:600; }
  #task-modal .composer-dates { grid-template-columns:1fr; gap:10px; }
  #task-modal .composer-created { padding-bottom:0; }
  #task-modal .task-created-at { font-size:10px; }
  #task-modal .composer-footer { flex-direction:column; align-items:stretch; gap:8px; padding:12px 16px max(14px, env(safe-area-inset-bottom), var(--pulse-safe-bottom, 0px)); }
  #task-modal .composer-footer-note { font-size:10px; text-align:center; }
  #task-modal #task-save-button { width:100%; min-width:0; min-height:50px; font-size:13px; }
}
@media (max-width:360px) {
  #task-modal .task-field-row { align-items:flex-start; }
  #task-modal .task-field-actions { width:100%; }
  #task-modal .task-field-actions button { flex:1; }
  #task-modal .composer-subtitle { display:none; }
}
@keyframes composer-enter { from { opacity:0; transform:translateY(16px) scale(.985); } to { opacity:1; transform:translateY(0) scale(1); } }
@media (prefers-reduced-motion:reduce) {
  #task-modal.task-composer, #task-modal-backdrop, #task-modal *, #task-modal *::after { animation:none!important; transition:none!important; }
}
