.recurrence-toggle{display:flex;align-items:center;gap:16px;margin:20px 0}.recurrence-toggle select{width:auto;min-width:150px}.recurrence-toggle .field-hint{margin:0}.rec-config-period{padding:20px;border:1px solid var(--line,#d4e0d7);border-radius:10px;background:#f1f5ee;margin:16px 0}.rec-preview{margin:16px 0 0;padding-top:16px;border-top:1px solid #d4e0d7}.rec-preview-dates{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}.rec-preview-dates span{background:white;padding:6px 10px;border:1px solid #d4e0d7;border-radius:5px;font-size:.9rem}.rec-people{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}.rec-people button[aria-pressed=true]{background:#e5eee0;border-color:#81a17a;color:#315e44}.rec-children{margin:22px 0}.rec-child{padding:12px 0;border-bottom:1px solid #d4e0d7}.rec-child-top{display:flex;gap:10px;align-items:center}.rec-child-top input{min-width:0;flex:1}.rec-child-top button{flex:none}.rec-child select{margin-top:10px}.rec-action-box{padding:12px 16px;background:#fcf6e9;border:1px solid #dfcfa6;border-radius:8px;margin:12px 0}.rec-action-box p{margin:0 0 10px}.rec-editor-notice{padding:12px 16px;background:#eef3e9;border-radius:8px}.rec-dialog{width:min(940px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:0;overflow:hidden}.rec-dialog-shell{display:flex;flex-direction:column;max-height:calc(100dvh - 32px)}.rec-dialog-head,.rec-dialog-foot{padding:20px 28px;background:#fff;flex:none}.rec-dialog-head{display:flex;align-items:flex-start;justify-content:space-between;border-bottom:1px solid #d4e0d7}.rec-dialog-head h2{margin:4px 0}.rec-dialog-scroll{overflow:auto;padding:24px 28px;min-height:0}.rec-dialog-foot{border-top:1px solid #d4e0d7}.rec-dialog-foot .form-actions{margin:0;justify-content:flex-end}.rec-settings{padding:20px 0}.rec-settings-head{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}.rec-filter{display:flex;align-items:end;gap:16px;flex-wrap:wrap;margin:24px 0}.rec-filter .field{margin:0}.rec-rule-list{border:1px solid #d4e0d7;border-radius:10px;overflow:hidden;background:white}.rec-rule-row{display:grid;grid-template-columns:minmax(200px,2fr) minmax(130px,1fr) minmax(120px,1fr) 100px 90px;gap:16px;align-items:center;padding:20px;border-bottom:1px solid #d4e0d7}.rec-rule-row:last-child{border-bottom:0}.rec-rule-row small{display:block;margin-top:6px;color:#748877}.rec-rule-row[data-paused=true]{background:#f8faf6}.rec-settings-tile{display:flex;align-items:center;gap:20px;width:min(550px,100%);text-align:left;padding:24px;margin:20px 0}.rec-settings-tile strong,.rec-settings-tile small{display:block}.rec-future{margin:14px 0;padding:12px;background:#f6f8f1;border-left:3px solid #9aaa7e}.rec-basic{border-top:1px solid #d4e0d7;margin-top:24px;padding-top:18px}.rec-history{list-style:none;margin:16px 0;padding-left:18px;border-left:1px solid #d4e0d7}.rec-history li{padding:0 0 18px 8px}.rec-history small{display:block;color:#788b7c}.rec-arrangement{padding:16px;background:#f5f8f1;border:1px solid #d4e0d7;border-radius:8px;margin:16px 0}.rec-arrangement p{margin:4px 0}.rec-note-form{margin-top:24px}.rec-empty{padding:20px;color:#748877}.rec-date-note{font-size:.9rem;color:#788b7c}.rec-no-rule-right{font-size:.9rem;color:#867245;margin:8px 0}.rec-inline-status{margin:8px 0;color:#867245}.rec-builtin-items{padding-left:22px}.rec-builtin-items li{padding:12px 0}.rec-builtin-items small{display:block;color:#748877}
@media(max-width:600px){.recurrence-toggle{flex-wrap:wrap;gap:10px}.rec-dialog{width:100vw;height:100dvh;max-height:100dvh;border-radius:0;border:0}.rec-dialog-shell{height:100dvh;max-height:100dvh}.rec-dialog-head,.rec-dialog-foot{padding:16px}.rec-dialog-scroll{padding:18px 16px}.rec-dialog-foot .form-actions{display:flex;flex-wrap:wrap}.rec-dialog-foot button{flex:1;min-width:120px}.rec-config-period{padding:14px}.rec-rule-row{grid-template-columns:1fr auto;gap:8px;padding:16px}.rec-rule-row>:first-child{grid-column:1/-1}.rec-rule-row>div{min-width:0}.rec-rule-row button{grid-column:2;grid-row:2/4}.rec-rule-row small,.rec-rule-row strong{overflow-wrap:anywhere}.rec-filter .field{flex:1;min-width:130px}.rec-preview-dates{gap:5px}.rec-preview-dates span{padding:6px;font-size:.85rem}.rec-child-top{gap:6px}.rec-child-top button{padding:8px}.rec-settings-head .primary{width:100%}}
.rec-settings-entries{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:20px 0}.rec-settings-entries .rec-settings-tile{width:100%;margin:0;justify-content:space-between;padding:20px;gap:12px}.rec-settings-entries .rec-settings-tile small{font-size:.86rem;font-weight:400;margin-top:8px;line-height:1.6}.rec-settings-entries .rec-settings-tile .badge{flex:none}.rec-guide-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin:24px 0;align-items:start}.rec-guide-module{min-width:0;border:1px solid var(--line,#d4e0d7);border-radius:10px;background:white;padding:24px}.rec-guide-module-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap;margin-bottom:12px}.rec-guide-module-head h3{margin:0}.rec-guide-module-head>span{font-size:.9rem}.rec-guide-table{width:100%;border-collapse:collapse;text-align:left}.rec-guide-table th{color:var(--muted,#748877);font-size:.9rem;font-weight:400}.rec-guide-table th,.rec-guide-table td{padding:14px 0;border-bottom:1px solid var(--line,#d4e0d7);vertical-align:top}.rec-guide-table td:first-child{padding-right:18px;overflow-wrap:anywhere}.rec-guide-table tr:last-child td{border-bottom:0}.rec-guide-table strong{font-weight:500}.rec-guide-owner{width:5em;white-space:nowrap;color:var(--green,#315e44)}.rec-guide-note{font-size:.88rem;line-height:1.7;color:var(--muted,#748877);margin:8px 0 0;overflow-wrap:anywhere}.rec-guide-work{padding:0;margin:0;list-style:none}.rec-guide-work>li{padding:16px 0;border-bottom:1px solid var(--line,#d4e0d7)}.rec-guide-work small,.rec-guide-work strong{display:block;overflow-wrap:anywhere}.rec-guide-work strong{font-size:1.06rem;margin-top:6px}.rec-guide-notes{margin-top:20px;font-size:.92rem;line-height:1.8}.rec-guide-notes summary{cursor:pointer}.rec-guide-notes ul{padding-left:22px}.rec-guide-notes li{margin:8px 0}@media(max-width:900px){.rec-settings-entries{grid-template-columns:1fr}.rec-guide-grid{grid-template-columns:1fr;gap:16px}.rec-guide-module{padding:18px}.rec-guide-table td:first-child{padding-right:12px}}

/* Effective shift rule guide; responsibility guide keeps its original styles. */
.rec-shift-rule-guide {
  --sg-bg: light-dark(#f4f6f2, #17211e);
  --sg-paper: light-dark(#ffffff, #202c27);
  --sg-text: light-dark(#203f3a, #e0eae3);
  --sg-muted: light-dark(#63766d, #abbfb2);
  --sg-line: light-dark(#d5e1d5, #415449);
  --sg-green: light-dark(#326b5d, #a8d4bc);
  --sg-soft: light-dark(#eef4eb, #2b3f32);
  --sg-amber: light-dark(#916320, #ebc082);
  --sg-amber-bg: light-dark(#fbf8ee, #352f23);
  --sg-amber-line: light-dark(#e8dcc0, #685838);
  color: var(--sg-text);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  width: 100%;
}
.rec-shift-rule-guide * { box-sizing: border-box; }
.rec-shift-rule-guide [hidden] { display: none !important; }
.rec-shift-rule-guide button { font: inherit; cursor: pointer; }
.rec-shift-rule-guide .sg-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rec-shift-rule-guide h1 { color: var(--sg-text); font-size: 25px; font-weight: 700; line-height: 1.4; margin: 0; }
.rec-shift-rule-guide .sg-readonly { font-size: 12px; color: var(--sg-muted); border: 1px solid var(--sg-line); border-radius: 4px; padding: 2px 8px; white-space: nowrap; }
.rec-shift-rule-guide .sg-description { font-size: 13px; margin: 6px 0 19px; color: var(--sg-muted); }
.rec-shift-rule-guide .sg-description strong { color: var(--sg-green); font-weight: 400; }
.rec-shift-rule-guide .sg-current { display: flex; gap: 8px 16px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; font-size: 13px; }
.rec-shift-rule-guide .sg-current strong { font-weight: 600; }
.rec-shift-rule-guide .sg-current span { margin-left: auto; color: var(--sg-muted); font-size: 12px; }
.rec-shift-rule-guide .sg-pending { border: 1px solid var(--sg-amber-line); border-radius: 9px; background: var(--sg-paper); margin-bottom: 18px; overflow: clip; }
.rec-shift-rule-guide .sg-pending summary { cursor: pointer; padding: 12px 16px; color: var(--sg-amber); background: var(--sg-amber-bg); font-size: 14px; }
.rec-shift-rule-guide .sg-pending summary strong { font-weight: 600; }
.rec-shift-rule-guide .sg-pending summary small { font-size: 12px; margin-left: 12px; font-weight: 400; }
.rec-shift-rule-guide .sg-change-list { padding: 0 16px; }
.rec-shift-rule-guide .sg-change { display: grid; grid-template-columns: 68px minmax(160px, 1fr) minmax(165px, 1fr) 70px; gap: 10px; align-items: center; padding: 10px 0; font-size: 13px; }
.rec-shift-rule-guide .sg-change + .sg-change { border-top: 1px solid var(--sg-line); }
.rec-shift-rule-guide .sg-kind { color: var(--sg-amber); font-size: 12px; }
.rec-shift-rule-guide .sg-change-title { font-weight: 600; }
.rec-shift-rule-guide .sg-change-value { color: var(--sg-muted); }
.rec-shift-rule-guide .sg-change-date { color: var(--sg-amber); text-align: right; white-space: nowrap; font-size: 12px; }
.rec-shift-rule-guide .sg-pending-foot { color: var(--sg-muted); font-size: 12px; margin: 0; padding: 9px 16px 11px; border-top: 1px solid var(--sg-line); }
.rec-shift-rule-guide .sg-no-pending { margin: 0 0 15px; color: var(--sg-muted); font-size: 12px; }
.rec-shift-rule-guide .sg-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.rec-shift-rule-guide .sg-shift { background: var(--sg-paper); border: 1px solid var(--sg-line); border-radius: 10px; padding: 20px; }
.rec-shift-rule-guide .sg-shift-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rec-shift-rule-guide h2 { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.4; }
.rec-shift-rule-guide .sg-time { font-size: 14px; font-variant-numeric: tabular-nums; }
.rec-shift-rule-guide h3 { margin: 20px 0 0; font-size: 14px; font-weight: 600; color: var(--sg-muted); line-height: 1.5; }
.rec-shift-rule-guide .sg-rule { padding: 15px 0; border-bottom: 1px solid var(--sg-line); }
.rec-shift-rule-guide .sg-rule-name { font-size: 12px; color: var(--sg-muted); margin-bottom: 4px; }
.rec-shift-rule-guide .sg-task-name { font-size: 16px; font-weight: 600; line-height: 1.55; margin: 0; overflow-wrap: anywhere; }
.rec-shift-rule-guide .sg-task-name + .sg-task-name { margin-top: 5px; }
.rec-shift-rule-guide .sg-meta { font-size: 12px; color: var(--sg-muted); margin: 7px 0 0; overflow-wrap: anywhere; }
.rec-shift-rule-guide .sg-schedule { display: inline-block; color: var(--sg-green); background: var(--sg-soft); padding: 2px 7px; font-size: 12px; border-radius: 4px; margin-bottom: 6px; }
.rec-shift-rule-guide .sg-notes { font-size: 13px; margin-top: 16px; color: var(--sg-green); }
.rec-shift-rule-guide .sg-notes summary { cursor: pointer; }
.rec-shift-rule-guide .sg-notes ul { padding-left: 18px; color: var(--sg-muted); font-size: 12px; margin: 10px 0 0; }
.rec-shift-rule-guide .sg-notes li + li { margin-top: 5px; }
.rec-shift-rule-guide .sg-footer { color: var(--sg-muted); font-size: 12px; margin: 16px 0 0; }
.rec-shift-rule-guide .sg-footer p { margin: 5px 0; }
.rec-shift-rule-guide .sg-status {font-size:13px;color:var(--sg-amber);}
.rec-shift-rule-guide .sg-status:empty {display:none;}
.rec-shift-rule-guide .sg-transition {display:block;margin-top:4px;font-size:12px;}
.rec-shift-rule-guide .sg-shift {min-width:0;}
.rec-shift-rule-guide .sg-change-value {overflow-wrap:anywhere;}
@media(max-width:700px) {
 .rec-shift-rule-guide .sg-columns {gap:12px;}
 .rec-shift-rule-guide .sg-shift {padding:16px;}
 .rec-shift-rule-guide .sg-change {grid-template-columns:62px minmax(0,1fr) 66px;gap:3px 8px;}
 .rec-shift-rule-guide .sg-change-title {grid-column:2;grid-row:1;}
 .rec-shift-rule-guide .sg-change-date {grid-column:3;grid-row:1;}
 .rec-shift-rule-guide .sg-change-value {grid-column:2 / 4;}
}
@media(max-width:560px) {
 .rec-shift-rule-guide .sg-columns {grid-template-columns:minmax(0,1fr);}
 .rec-shift-rule-guide .sg-current span {margin-left:0;}
 .rec-shift-rule-guide .sg-pending summary small {display:block;margin:5px 0 0 16px;}
 .rec-shift-rule-guide .sg-change-list {padding:0 12px;}
 .rec-shift-rule-guide .sg-change {grid-template-columns:56px minmax(0,1fr) 59px;}
 .rec-shift-rule-guide h1 {font-size:23px;}
}
@media(pointer:coarse) {.rec-shift-rule-guide summary {min-height:44px;}}

/* Shared fixed-rule read feedback; does not rebuild editor fields. */
.rec-read-status { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.rec-read-status[hidden] { display:none; }

.rec-rule-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.rec-settings-head .rec-rule-actions button{width:auto;white-space:nowrap}
