/* Page and dialog layouts share the same quiet hierarchy. */
:root{--page-space:18px;--item-space:16px;--item-radius:12px;--task-row-padding:8px;--task-row-min-height:76px}
.compact-page-heading,.unified-heading{padding:12px var(--page-space)}
.compact-page-heading h1,.unified-heading h1{font-size:22px;line-height:1.4;font-weight:500;letter-spacing:0}
.compact-heading-line{display:flex;align-items:center;justify-content:space-between;gap:12px}
.compact-heading-line>div{min-width:0}
.compact-heading-line>.button{flex-shrink:0;min-height:44px;font-size:14px;padding:8px 10px;border-radius:8px}
.compact-caption{font-size:13px;line-height:1.65;margin-top:5px;color:var(--muted);font-weight:400}
.unified-page{padding:8px var(--page-space) 24px}
.content{padding-left:var(--page-space);padding-right:var(--page-space)}
.tabs.line-tabs,.child-tasks-content>.tabs.line-tabs{display:flex;align-items:stretch;gap:16px;flex-wrap:nowrap;overflow:visible;background:none;border:0;border-bottom:1px solid var(--line);border-radius:0;padding:0;margin:0 0 16px;box-shadow:none}
.tabs.line-tabs>.tab,.child-tasks-content>.tabs.line-tabs>.tab{position:relative;flex:1;min-width:0;min-height:44px;padding:10px 0 12px;border:0;border-radius:0;background:none;box-shadow:none;color:var(--muted);font-size:14px;line-height:1.5;font-weight:400;text-align:center;white-space:normal;overflow-wrap:anywhere}
.tabs.line-tabs>.tab.active,.child-tasks-content>.tabs.line-tabs>.tab.active{color:var(--primary);font-weight:400;background:none;box-shadow:none}
.tabs.line-tabs>.tab.active:after{content:'';position:absolute;height:2px;bottom:-1px;left:calc(50% - 16px);width:32px;border-radius:2px;background:var(--primary)}
.line-tabs>.tab:focus-visible{outline-offset:-4px}
.child-task-toolbar,.list-context-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:40px;margin:0 0 8px}
.list-context-bar>span,.list-context-bar>p{font-size:13px;color:var(--muted);line-height:1.6}
.list-context-bar>.text-button{font-size:14px;flex-shrink:0;min-height:44px}
.list-context-bar .category-hint{margin:0}
.task-date-control,.task-plan-control{font-size:14px;font-weight:400;min-height:44px}
.task-plan-control{color:var(--primary)}
.task-period-label{font-size:13px;line-height:1.65}
.child-task-list,.parent-task-card,.unified-item-list{background:var(--surface);border:1px solid var(--line);border-radius:var(--item-radius);padding:0 12px;overflow:hidden}
.child-task-row,.unified-item-row,.task-manage-item{display:flex;align-items:center;gap:4px;min-width:0}
.child-task-row+.child-task-row,.unified-item-row+.unified-item-row,.task-manage-item+.task-manage-item{border-top:1px solid var(--line)}
.child-task-row>.child-task-open{flex:1;min-width:0;width:auto;min-height:var(--task-row-min-height);padding:var(--task-row-padding) 0;gap:8px}
.child-task-copy h3,.task-manage-row h3,.unified-item-copy>strong{font-size:16px;line-height:1.5;font-weight:400}
.child-task-times{font-size:13px;line-height:1.6;margin-top:3px;color:var(--muted);gap:4px}
.child-task-estimate{font-size:13px;line-height:1.6;margin-top:2px}
.time-separator{color:var(--muted)}
.child-task-action{font-size:13px;min-width:52px;color:var(--primary);font-weight:400}
.child-task-action.muted{color:var(--muted)}
.drag-handle{width:28px;min-width:28px;min-height:48px;padding:0;display:flex;align-items:center;justify-content:flex-start;color:var(--muted);font-size:22px;line-height:1;touch-action:none;cursor:grab;user-select:none;border-radius:6px;flex-shrink:0}
.drag-handle:hover,.drag-handle:focus-visible{color:var(--primary);background:var(--primary-soft)}
.drag-handle-space{width:28px;flex-shrink:0}
.task-sort-list:empty,.unified-item-list:empty{display:none}
.task-date-group>h2{font-size:14px;font-weight:400;color:var(--ink);padding:14px 0 4px}
.task-date-group>h2>span{font-size:13px;font-weight:400}
.task-date-group+.task-date-group{border-top:1px solid var(--line)}
.child-task-fold{margin-top:12px;border:1px solid var(--line);border-radius:var(--item-radius);background:var(--surface)}
.child-task-fold>summary{padding:12px;min-height:48px;font-size:14px;font-weight:400}
.child-task-fold>summary>span{font-size:13px}
.child-task-fold .child-task-list{padding:0 12px;border:0;border-radius:0}
.overdue-fold>summary{color:var(--ink)}
.child-list-clear{padding:24px 0;font-size:14px;line-height:1.7}
.task-manage-row{flex:1;min-width:0;width:auto;min-height:var(--task-row-min-height);gap:10px;text-align:left;padding:var(--task-row-padding) 0}
.task-manage-row>.icon{color:var(--muted);width:20px;height:20px}
.task-manage-row>div{min-width:0;flex:1}
.task-manage-row p{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px;font-size:13px;line-height:1.6;margin-top:3px}
.task-manage-row p>span:first-child,.task-repeat-tag{white-space:normal}
.task-repeat-tag{color:var(--muted);white-space:nowrap}
.task-manage-end{display:flex;align-items:center;gap:4px;max-width:84px;flex-shrink:0}
.task-manage-end .badge{font-size:13px;padding:3px 6px;white-space:normal;text-align:center}
.unified-item-open{display:flex;align-items:center;min-width:0;flex:1;width:100%;gap:12px;min-height:96px;text-align:left;padding:16px 0}
.unified-item-copy{display:flex;flex:1;min-width:0;flex-direction:column;gap:4px;overflow-wrap:anywhere}
.unified-item-copy>span,.unified-item-copy>small{font-size:13px;line-height:1.65;color:var(--muted);font-weight:400}
.item-symbol{display:grid;place-items:center;width:24px;height:32px;flex-shrink:0;border-radius:0;background:none;color:var(--muted)}
.item-symbol.orange,.item-symbol.neutral{background:none;color:var(--muted)}
.item-symbol.green{background:none;color:var(--success)}
.item-symbol>.icon{width:20px;height:20px}
.goal-row-end{display:flex;align-items:center;gap:4px;flex-shrink:0;max-width:88px}
.goal-row-end .badge,.routine-row .badge{font-size:13px;padding:3px 6px;line-height:1.5;white-space:normal;text-align:center}
.routine-row .item-symbol{display:none}
.routine-row .unified-item-open{gap:8px;min-height:var(--task-row-min-height);padding:var(--task-row-padding) 0}
.routine-row .unified-item-copy{gap:2px}
.routine-row .badge{max-width:64px}
.menu-list{padding:0 16px;border:1px solid var(--line);border-radius:var(--item-radius);background:var(--surface)}
.menu-row{min-height:76px;gap:12px;padding:16px 0;align-items:center}
.menu-row+.menu-row{border-top:1px solid var(--line)}
.menu-row strong{font-size:16px;line-height:1.5;font-weight:400}
.menu-row small{font-size:13px;line-height:1.65;margin-top:4px;font-weight:400}
.menu-row>.icon:first-child{width:20px;height:20px;flex-shrink:0;color:var(--muted)}
.menu-row>.icon:last-child{color:var(--muted);width:16px;height:16px}
.menu-row .badge{font-size:13px;padding:3px 6px;flex-shrink:0}
.mine-page>.stage-summary-row{margin-bottom:16px}
.stage-summary-row{display:flex;align-items:center;gap:12px;width:100%;min-height:88px;border:1px solid var(--line);border-radius:var(--item-radius);padding:16px;background:var(--surface);text-align:left}
.stage-summary-icon{display:grid;place-items:center;width:24px;height:32px;flex-shrink:0;color:var(--primary)}
.stage-summary-icon .icon{width:20px;height:20px}
.stage-summary-copy{display:flex;flex:1;min-width:0;flex-direction:column;gap:4px;overflow-wrap:anywhere}
.stage-summary-copy strong{font-size:16px;font-weight:400;line-height:1.5}
.stage-summary-copy>span{font-size:13px;line-height:1.65;color:var(--muted)}
.stage-summary-number{font-size:14px;color:var(--muted);font-variant-numeric:tabular-nums;flex-shrink:0}
.stage-summary-row>.icon{color:var(--muted);flex-shrink:0}
.stage-list{display:grid;gap:12px}
.stage-card{border:1px solid var(--line);border-radius:var(--item-radius);background:var(--surface);overflow:hidden}
.stage-card-open{width:100%;padding:16px;text-align:left;display:flex;flex-direction:column;gap:8px;min-width:0}
.item-eyebrow{font-size:13px;color:var(--muted);display:flex;align-items:center;gap:5px;line-height:1.65}
.stage-card-heading{display:flex;align-items:flex-start;gap:12px;justify-content:space-between;width:100%;min-width:0}
.stage-card-heading>strong{font-size:16px;font-weight:400;line-height:1.5;overflow-wrap:anywhere;min-width:0}
.stage-bonus{font-size:14px;line-height:1.7;font-weight:400;color:var(--primary);flex-shrink:0}
.item-copy{font-size:14px;line-height:1.8;color:var(--muted);font-weight:400}
.item-footnote{font-size:13px;line-height:1.65;color:var(--muted)}
.stage-progress-line{display:flex;align-items:center;gap:12px;width:100%;margin-top:4px}
.stage-progress-line>strong{font-size:14px;font-weight:400;color:var(--muted);font-variant-numeric:tabular-nums;flex-shrink:0}
.stage-progress-line>.icon{color:var(--muted)}
.stage-progress-track{display:block;height:5px;min-width:0;flex:1;background:var(--surface-soft);border-radius:6px;overflow:hidden}
.stage-progress-track>span{display:block;height:100%;border-radius:inherit;background:var(--primary)}
.stage-card-footer{padding:0 16px;border-top:1px solid var(--line)}
.stage-card-footer>.text-button{font-size:14px;min-height:44px;color:var(--muted)}
.detail-section{margin-top:24px}
.detail-section>h3,.detail-section .section-heading h3{font-size:14px;font-weight:400;margin-bottom:8px}
.detail-section .section-heading{margin-bottom:8px}
.detail-section .section-heading h3{margin-bottom:0}
.detail-section .section-heading .text-button{font-size:14px;min-height:44px}
.detail-section .menu-list{margin-top:8px;padding:0;border:0;border-radius:0;background:transparent}
.detail-section .menu-list>.item-copy{padding:8px 0}
.routine-stage-detail{border:0;border-radius:10px;background:var(--surface-soft);padding:16px}
.routine-stage-detail>strong{font-size:16px;font-weight:400;display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.routine-stage-detail>p{font-size:14px;line-height:1.75;color:var(--muted);margin:8px 0 12px}
.routine-stage-detail>small{display:block;margin-top:12px;color:var(--muted);font-size:13px;line-height:1.65}
.context-link{margin-top:16px;padding:12px 16px;border:1px solid var(--line);border-radius:var(--item-radius);background:var(--surface);font-size:14px}
.catalog-toolbar{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;padding-bottom:12px;margin-bottom:16px;border-bottom:1px solid var(--line)}
.catalog-toolbar>.button{justify-self:start}
.management-actions{padding:0;gap:24px;min-height:40px}
.management-actions>.text-button{min-height:44px;font-size:14px}
.catalog-filters{margin-bottom:16px;gap:12px}
.catalog-filters .search-box{border-radius:10px}
.item-category{font-size:13px;line-height:1.65;color:var(--muted);margin-bottom:3px}
.reward-grid{grid-template-columns:minmax(0,1fr);gap:0;padding:0 16px;border:1px solid var(--line);border-radius:var(--item-radius);background:var(--surface);overflow:hidden}
.reward-grid:empty{display:none}
.catalog-content .reward-card{display:flex;flex-direction:row;align-items:center;gap:12px;border:0;border-radius:0;background:transparent;padding:16px 0;box-shadow:none;min-width:0}
.catalog-content .reward-card+.reward-card{border-top:1px solid var(--line)}
.catalog-content .reward-card:hover{transform:none;box-shadow:none}
.catalog-content .reward-art,.reward-detail .reward-art{display:grid;place-items:center;width:28px;height:32px;flex-shrink:0;background:none;border-radius:0;color:var(--muted);margin:0;overflow:visible}
.catalog-content .reward-art:before,.catalog-content .reward-art:after,.reward-detail .reward-art:before,.reward-detail .reward-art:after{display:none}
.catalog-content .reward-art .icon,.reward-detail .reward-art .icon{width:22px;height:22px}
.reward-card-copy{flex:1;min-width:0;overflow-wrap:anywhere}
.reward-card h3{font-size:16px;font-weight:400;line-height:1.5}
.reward-card .item-category{font-size:13px;margin-bottom:3px}
.reward-card .reward-price{font-size:14px;color:var(--muted);font-weight:400;line-height:1.65;margin:5px 0 0}
.reward-price small{font-size:14px;font-weight:400}
.catalog-content .reward-card .reward-action{flex:0 0 auto;width:auto;max-width:90px;margin:0;padding:8px 0 8px 8px;min-height:44px;font-size:14px;font-weight:400;line-height:1.5;color:var(--muted);background:none;box-shadow:none;border:0;white-space:normal}
.catalog-content .reward-card .reward-action.can-redeem{color:var(--primary)}
.points-chip{background:none;border:0;border-radius:8px;padding:6px 0 6px 8px;font-size:13px;gap:5px;min-height:44px;max-width:55%}
.points-chip .icon{width:20px;height:20px;color:var(--primary);fill:none}
.points-chip strong{font-size:20px;font-weight:600;color:var(--ink)}
.points-chip>span{color:var(--muted)}
.reward-management-list{padding:0 16px}
.reward-admin-row{padding:16px 0;gap:12px;border-bottom:1px solid var(--line)}
.reward-admin-row:last-child{border-bottom:0}
.reward-admin-row h3{font-size:16px;font-weight:400}
.reward-admin-row p{font-size:13px;line-height:1.65}
.reward-admin-row>.icon{color:var(--muted);width:20px;height:20px}
.reward-admin-row .button{font-size:14px}
.owned-reward-list .badge{white-space:normal;max-width:65px;text-align:center}
.parent-inbox .tabs.line-tabs{gap:8px}
.parent-inbox .tabs.line-tabs>.tab{font-size:14px;padding-left:0;padding-right:0}
.inbox-list{display:block;padding:0 16px;border:1px solid var(--line);border-radius:var(--item-radius);background:var(--surface);overflow:hidden}
.review-row{margin:0;border:0;border-radius:0;padding:16px 0;background:transparent}
.review-row+.review-row{border-top:1px solid var(--line)}
.review-heading{gap:10px;align-items:flex-start}
.review-heading>.icon{width:20px;height:20px;color:var(--muted);margin-top:2px}
.review-heading h3{font-size:16px;font-weight:400;line-height:1.5}
.review-heading p{font-size:13px;line-height:1.65;margin-top:4px}
.review-heading>.badge{font-size:13px;padding:3px 6px;max-width:74px;white-space:normal;text-align:center}
.review-preview{display:grid;grid-template-columns:76px minmax(0,1fr);gap:12px;margin:12px 0 0 30px;align-items:start}
.review-photo{height:88px;padding:4px;background:var(--surface-soft);border:1px solid var(--line);border-radius:8px}
.review-message{font-size:14px;line-height:1.75;font-weight:400;background:none;border:0;border-radius:0;padding:0;overflow-wrap:anywhere;color:var(--ink)}
.review-message strong{font-size:13px;line-height:1.65;font-weight:400;color:var(--muted);margin-bottom:4px;gap:4px}
.review-message-alone{margin:12px 0 0 30px}
.review-message-form{margin:16px 0 24px}
.review-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:16px;margin-top:8px}
.review-actions>.button{min-height:44px;font-size:14px;padding:8px 0;font-weight:400;background:none;border:0;box-shadow:none}
.record-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:8px}
.review-row>.record-footer{margin-left:30px}
.record-time{flex:1;min-width:0;font-size:13px;line-height:1.65;color:var(--muted);font-weight:400;overflow-wrap:anywhere;text-align:left}
.record-footer>.review-actions{flex:0 0 auto;align-items:center;flex-wrap:nowrap;gap:12px;margin:0}
.record-open{display:inline-flex;align-items:center;gap:3px;min-height:44px;font-size:14px;font-weight:400;color:var(--primary)}
.action-link,.review-actions>.action-link{color:var(--primary)}
.review-row>.subtle-note{margin:12px 0 0 30px;font-size:13px}
.request-list{gap:0;border:1px solid var(--line);border-radius:var(--item-radius);padding:0 16px;background:var(--surface);overflow:hidden}
.request-card{border:0;border-radius:0;padding:16px 0;background:none}
.request-card+.request-card{border-top:1px solid var(--line)}
.request-card-top{gap:10px}
.request-card-top h3{font-size:16px;font-weight:400;line-height:1.5}
.request-card-top h3>.icon{color:var(--muted);width:20px;height:20px;margin-right:4px}
.request-card-top .badge{font-size:13px;max-width:90px;white-space:normal;text-align:center}
.request-card p{font-size:13px;margin-top:8px;line-height:1.65}
.category-list{gap:0;margin:0 0 12px;border:1px solid var(--line);border-radius:var(--item-radius);overflow:hidden;background:var(--surface)}
.category-row{display:flex;align-items:center;gap:8px;border:0;border-radius:0;padding:12px;min-height:80px;background:transparent}
.category-row+.category-row{border-top:1px solid var(--line)}
.category-info{flex:1;min-width:0}
.category-info h3{font-size:16px;font-weight:400;line-height:1.5}
.category-info p{font-size:13px;line-height:1.65}
.category-row .button{font-size:14px;padding:8px 6px;min-height:44px;flex-shrink:0;min-width:44px}
.category-row .icon-button{width:44px;min-width:44px;min-height:44px}
.category-hint{font-size:13px;line-height:1.65}
.rule-card{padding:16px;background:var(--surface);border:1px solid var(--line);border-radius:var(--item-radius);margin-bottom:12px}
.rule-top{align-items:flex-start;gap:12px}
.rule-top h3{font-size:16px;font-weight:400}
.rule-top p,.rule-meta{font-size:13px;line-height:1.65}
.rule-preview{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin:12px 0 0;padding:0;background:none;color:var(--muted);font-size:14px;line-height:1.65;border-radius:0}
.rule-preview>strong{color:var(--danger);font-size:14px;font-weight:400;text-align:right}
.rule-buttons{gap:12px;flex-wrap:wrap;margin-top:12px}
.rule-buttons .button{font-size:14px;min-height:44px;padding:8px 10px;flex:0 1 auto}
.rule-meta{margin-top:12px}
.penalty-history{margin-top:24px}
.ledger-list{padding:0 16px;border:1px solid var(--line);border-radius:var(--item-radius);background:var(--surface)}
.ledger-row{padding:16px 0;gap:12px}
.ledger-row+.ledger-row{border-top:1px solid var(--line)}
.ledger-row h3{font-size:16px;font-weight:400;line-height:1.5}
.ledger-row p{font-size:13px;line-height:1.65}
.ledger-symbol{width:24px;height:32px;border-radius:0;background:none;color:var(--success)}
.ledger-symbol.minus{background:none;color:var(--danger)}
.ledger-amount,.penalty-history .ledger-amount{font-size:16px;line-height:1.5;font-weight:400;flex-shrink:0}
.balance-panel{padding:0 0 20px;background:none;border:0;border-radius:0;margin-bottom:4px}
.balance-label{font-size:14px;color:var(--muted)}
.balance-value{font-size:32px;font-weight:600;color:var(--ink);gap:8px;margin-top:6px}
.balance-value .icon{width:24px;height:24px;color:var(--primary);fill:none}
.balance-value small{font-size:14px;color:var(--muted);font-weight:400}
/* Dialogs keep forms and facts on a single content plane. */
.sheet-head{padding:16px 20px 12px}
.sheet-head h2{font-size:20px;font-weight:500;line-height:1.5}
.sheet-body{font-size:16px;line-height:1.7;padding:20px}
.sheet-body h3{font-size:16px;font-weight:400;line-height:1.5}
.sheet-body h3.large{font-size:20px;font-weight:400;line-height:1.5;margin-bottom:12px}
.sheet-body .field-label{font-size:14px;font-weight:400;line-height:1.5;margin-bottom:8px}
.sheet-body .form-intro{font-size:13px;line-height:1.75;color:var(--muted);margin:0 0 20px}
.sheet-body .field-hint{font-size:13px;line-height:1.65;font-weight:400}
.sheet-body .field{margin-bottom:20px}
.sheet-body .field:last-child{margin-bottom:0}
.sheet-body .field-row{gap:12px}
.sheet-copy{font-size:16px;line-height:1.8;color:var(--muted);margin:12px 0 20px}
.detail-facts{display:flex;flex-direction:column;align-items:flex-start;gap:7px;font-size:14px;line-height:1.65;color:var(--muted);margin-top:12px}
.detail-facts>span{min-width:0;max-width:100%;align-items:flex-start;overflow-wrap:anywhere}
.detail-facts>span>.icon{margin-top:3px;color:var(--muted)}
.detail-facts>span:empty{display:none}
.detail-stack{padding:0;margin:16px 0;background:none;border:0;border-radius:0}
.detail-line{gap:16px;padding:12px 0;font-size:14px;line-height:1.65}
.detail-line+.detail-line{border-top:1px solid var(--line)}
.detail-line>span:first-child{max-width:45%;white-space:normal;flex-shrink:0}
.detail-line>strong{font-size:16px;font-weight:400;line-height:1.5;text-align:right}
.request-goal-criteria{padding:0 0 12px}
.request-goal-criteria>strong{font-size:14px;font-weight:400}
.request-goal-criteria p{margin-top:8px}
.reward-detail{border:0;padding:0;background:none}
.reward-detail-heading{display:flex;align-items:center;gap:12px}
.reward-detail-heading h3{font-size:20px;font-weight:400;line-height:1.5;min-width:0;overflow-wrap:anywhere}
.sheet-body .switch-row{padding:14px 0;gap:16px;font-size:14px;line-height:1.5;border-top:1px solid var(--line)}
.sheet-body .switch-row>span{min-width:0}
.sheet-body .switch-row small{font-size:13px;line-height:1.65;margin-top:4px}
.sheet-body .details-settings{margin:20px 0;border:0;border-top:1px solid var(--line);border-radius:0;padding:16px 0 0}
.sheet-body .details-settings>summary{font-size:14px;font-weight:400;line-height:1.5;min-height:44px}
.sheet-body .details-settings[open]>summary{margin-bottom:16px}
.sheet-body .score-fields{margin-top:0;grid-template-columns:repeat(2,minmax(0,1fr))}
.notice,.notice.warm{font-size:14px;line-height:1.75;font-weight:400;border-radius:10px;padding:12px 14px;margin:16px 0;background:var(--surface-soft);color:var(--muted)}
.notice strong{font-weight:400}
.notice p{margin-top:4px}
.notice.danger{color:var(--danger);background:var(--danger-soft)}
.upload-zone{min-height:108px;gap:8px;padding:16px;border:1px dashed var(--line);border-radius:10px;background:var(--surface-soft);color:var(--muted);font-size:14px}
.upload-zone>.icon{width:24px;height:24px}
.upload-zone small{font-size:13px}
.photo-previews{gap:12px;margin-top:12px}
.photo-preview{border-radius:8px}
.large-photo{border:1px solid var(--line);padding:8px;background:var(--surface-soft);border-radius:10px;margin:16px 0}
.large-photo .sample-paper{height:300px;font-size:16px;transform:none;box-shadow:none;padding:16px}
.large-photo .paper-heading{font-size:20px;font-weight:400}
.large-photo .sample-paper p{font-size:14px}
.grade-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0 16px}
.grade-option span{min-height:76px;border-radius:10px;padding:12px 6px;border:1px solid var(--line);font-size:14px;font-weight:400;gap:6px;background:var(--surface)}
.grade-option small{font-size:13px;font-weight:400}
.grade-option input:checked+span{border:1px solid var(--primary);background:var(--primary-soft);color:var(--primary);padding:12px 6px}
.score-summary{font-size:14px;font-weight:400;padding:12px 14px;line-height:1.65;background:var(--surface-soft);border-radius:10px;color:var(--ink);margin-bottom:20px}
.score-summary.negative{color:var(--danger);background:var(--danger-soft)}
.planning-row{padding:20px 0;border-bottom:1px solid var(--line)}
.planning-row:first-of-type{padding-top:0}
.planning-row h3{font-size:16px;font-weight:400;margin-bottom:4px}
.planning-row>.field-hint{margin:0 0 16px}
.planning-row .field{margin-bottom:16px}
.planning-overdue{margin-top:24px}
.planning-overdue>h3{font-size:14px;font-weight:400}
.sheet-body .rule-card{padding:16px 0;border:0;border-bottom:1px solid var(--line);border-radius:0;margin:0}
.sheet-body .rule-card:first-of-type{padding-top:0}
.sheet-body .rule-card:last-of-type{margin-bottom:16px}
.sheet-body .menu-list.info-rows,#members-form .menu-list{border:0;padding:0;background:transparent}
.sheet-body .menu-list{border-radius:var(--item-radius)}
.sheet-body .detail-section>h3{font-size:14px;font-weight:400}
.sheet-body .section-label{font-size:14px;font-weight:400;margin:24px 0 12px}
.sheet-body .subtle-note{font-size:13px;line-height:1.65}
.sheet-body .pill-checks{gap:8px}
.sheet-body .pill-checks label{font-size:14px;font-weight:400;background:var(--surface-soft);padding:8px;min-height:40px;border-radius:8px}
.sheet-body .pill-checks label:has(input:checked){color:var(--primary);background:var(--primary-soft)}
.add-row-action{margin-top:20px}
.prototype-tools{margin-top:24px;padding-top:16px;border-top:1px solid var(--line)}
.prototype-tools summary{font-size:13px;line-height:1.65;min-height:40px}
.about-fox{width:80px;margin:0 auto 16px}
.sheet-body .about-title{font-size:20px;font-weight:400;text-align:center}
.document-prose{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.85;font-size:16px;color:var(--ink);font-weight:400}
.document-editor{min-height:330px;line-height:1.85;resize:vertical}
.document-markdown{white-space:normal}
.document-markdown h3{font-size:16px;font-weight:500;line-height:1.7;margin:24px 0 12px;color:var(--ink)}
.document-markdown p{margin:12px 0;line-height:1.85}
.document-markdown ol{padding-left:24px;margin:12px 0}
.document-markdown li{padding:0 0 8px}
.document-markdown strong{font-weight:400}
.document-table{width:100%;min-width:0;margin:12px 0 20px;border:1px solid var(--line);border-radius:10px;overflow:hidden}
.document-table table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:14px;line-height:1.8;background:var(--surface)}
.document-table th,.document-table td{text-align:left;vertical-align:top;overflow-wrap:anywhere;padding:10px 8px;border-bottom:1px solid var(--line);border-right:1px solid var(--line)}
.document-table th{font-weight:400;background:var(--surface-soft);color:var(--ink)}
.document-table tr:last-child td{border-bottom:0}
.document-table td:last-child,.document-table th:last-child{border-right:0}
.document-sheet{padding-left:20px;padding-right:20px}
.empty-state{padding:32px 12px}
.empty-state h3{font-size:16px;font-weight:500}
.empty-state p{font-size:13px;line-height:1.8}
@media(min-width:900px){
 :root{--page-space:32px}
 .compact-page-heading,.unified-heading{padding-top:16px;padding-bottom:12px}
 .unified-page{padding-top:8px}
 .stage-list{grid-template-columns:repeat(2,minmax(0,1fr))}
 .sheet-body .stage-list{grid-template-columns:minmax(0,1fr)}
 .catalog-toolbar{grid-template-columns:auto minmax(0,1fr);align-items:center;gap:24px}
 .management-actions{justify-content:flex-end}
 .reward-grid{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:600px){
 .sheet-head{padding:12px 20px}
 .sheet-body{padding:20px 18px}
 .document-sheet{padding-left:18px;padding-right:18px}
}
@media(max-width:359px){
 :root{--page-space:16px}
 .compact-heading-line{gap:8px}
 .compact-heading-line>.button{font-size:14px;padding:8px 10px;min-height:44px;border-radius:8px}
 .tabs.line-tabs,.child-tasks-content>.tabs.line-tabs{gap:8px}
 .parent-inbox .tabs.line-tabs{gap:4px}
 .child-task-list,.parent-task-card,.unified-item-list{padding:0 10px}
 .drag-handle{width:24px;min-width:24px}
 .task-manage-row>.icon{display:none}
 .child-task-open{gap:6px}
 .child-task-action{min-width:48px;font-size:13px}
 .item-symbol{display:none}
 .goal-row-end{max-width:80px}
 .stage-card-open{padding:16px 12px}
 .stage-card-heading{gap:8px;flex-wrap:wrap}
 .stage-card-heading>strong{flex:1 1 140px}
 .menu-list,.inbox-list,.request-list,.reward-grid{padding:0 12px}
 .menu-row{gap:10px}
 .stage-summary-row{padding:12px;gap:8px}
 .stage-summary-icon{display:none}
 .stage-summary-number{font-size:14px}
 .category-row{gap:4px;padding:12px 8px}
 .category-row .icon-button{width:44px;min-width:44px;min-height:44px}
 .category-row .button{padding:8px 6px;min-height:44px;min-width:44px;font-size:14px}
 .sheet-body .field-row{gap:10px}
 .catalog-content .reward-card{gap:8px}
 .catalog-content .reward-art{width:24px}
 .catalog-content .reward-card .reward-action{max-width:82px;font-size:14px}
 .review-preview{margin-left:0;grid-template-columns:64px minmax(0,1fr);gap:10px}
 .review-message-alone,.review-row>.subtle-note,.review-row>.record-footer{margin-left:0}
 .review-photo{height:82px}
 .review-actions{gap:14px}
 .grade-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Shared compact headers and contextual tools. */
.heading-title{display:flex;align-items:baseline;gap:6px 10px;flex-wrap:wrap;min-width:0}
.heading-title h1{flex-shrink:0}
.heading-summary{font-size:13px;line-height:1.5;color:var(--muted);font-weight:400}
.compact-page-heading,.unified-heading{padding-top:6px;padding-bottom:6px}
.heading-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}
.heading-actions .points-chip{max-width:none;flex-wrap:nowrap;padding-inline:0;gap:4px}
.heading-actions .points-chip strong{font-size:18px}
.heading-actions .button{flex-shrink:0}
.heading-actions .points-chip>.icon{width:17px;height:17px}
.heading-actions .points-chip>span{font-size:12px}
.tabs.line-tabs,.child-tasks-content>.tabs.line-tabs{margin-bottom:8px}
.catalog-tools-row{display:flex;align-items:center;gap:8px;margin-bottom:12px}
.catalog-tools-row .catalog-filters{flex:1;min-width:0;margin:0;gap:8px}
.catalog-tools-row .catalog-filters>label{min-width:0}
.catalog-tools-row .search-box{min-width:0;gap:5px;padding-inline:8px}
.catalog-tools-row .select-trigger{padding-inline:9px;gap:5px}
.catalog-tools-row .select-trigger .select-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.management-menu{position:relative;flex-shrink:0;font-size:13px}
.management-menu>summary{display:flex;align-items:center;justify-content:center;gap:4px;min-width:44px;min-height:44px;list-style:none;cursor:pointer;color:var(--muted)}
.management-menu>summary::-webkit-details-marker{display:none}
.management-popover{position:absolute;right:0;top:44px;z-index:40;background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:4px 12px;min-width:156px;box-shadow:var(--shadow)}
.management-popover .text-button{display:flex;width:100%;text-align:left;white-space:nowrap}
.task-date-filter{min-width:0;max-width:200px;flex-shrink:1}
.task-date-filter .planner-control-trigger{min-height:44px;border:0;padding:6px 0;background:none;font-size:13px;gap:5px;white-space:nowrap}
.task-date-filter .planner-control-value{overflow-wrap:normal}
.task-date-filter .planner-control-trigger>svg{width:16px;height:16px}
.child-task-toolbar{gap:8px;margin-bottom:4px}
.list-context-bar:has(.task-date-filter){gap:8px}
.list-context-bar:has(.task-date-filter)>span{margin-left:auto;white-space:nowrap}
.task-plan-control{font-size:13px;white-space:nowrap;padding-inline:0}
.nowrap,.stage-bonus,.ledger-amount{white-space:nowrap}
.stage-summary-copy>span{overflow-wrap:normal;word-break:normal}
.stage-summary-reward{display:block;font-size:13px;color:var(--muted)}
.stage-summary-row{min-height:80px;padding:12px}
.optional-record{border-top:1px solid var(--line);margin-top:16px;padding-top:4px}
.optional-record>summary,.document-history>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;list-style:none;min-height:44px;font-size:14px;font-weight:400;cursor:pointer}
.optional-record>summary::-webkit-details-marker,.document-history>summary::-webkit-details-marker{display:none}
.optional-record[open]>summary{margin-bottom:12px}
.draft-note{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:13px;color:var(--muted);border-bottom:1px solid var(--line);margin-bottom:16px}
.draft-note .text-button{font-size:13px;color:var(--primary);white-space:nowrap}
.settings-documents{margin-top:16px}
.settings-documents .section-heading{margin:0 0 4px}
.settings-documents h2{font-size:15px;font-weight:500}
.document-history{margin-top:16px;border-top:1px solid var(--line)}
.document-history>summary>span{margin-left:auto;color:var(--muted);font-size:13px}
.ledger-row{gap:8px;min-width:0}
.ledger-row>div{min-width:0}
.ledger-correct{flex-shrink:0;min-width:44px;width:44px;min-height:44px;color:var(--muted)}
.ledger-row .ledger-amount{font-size:16px}
@media(max-width:359px){
 .compact-page-heading h1,.unified-heading h1{font-size:20px}
 .heading-actions{gap:6px}
 .heading-actions .points-chip{gap:2px}
 .heading-actions .points-chip>.icon{display:none}
 .catalog-tools-row{gap:6px}
 .management-menu>summary>span{display:none}
 .task-date-filter{max-width:172px}
 .task-date-filter .planner-control-trigger{gap:4px;font-size:12px}
 .list-context-bar:has(.task-date-filter)>span{display:none}
 .ledger-row:has(.ledger-correct)>.ledger-symbol{display:none}
}

.score-history{border-top:1px solid var(--line);margin-top:16px}
.score-history>summary{display:flex;gap:8px;align-items:center;min-height:44px;list-style:none;font-size:14px;cursor:pointer}
.score-history>summary::-webkit-details-marker{display:none}
.score-history>summary>span{margin-left:auto;color:var(--muted);font-size:13px}
.score-history-item{padding:12px 0;border-top:1px solid var(--line);font-size:14px}

.document-list-page .unified-item-copy>span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;max-height:3.3em}
.stage-card{position:relative}
.stage-edit{position:absolute;right:8px;top:8px;z-index:1;color:var(--muted);min-width:44px;min-height:44px;width:44px}
.stage-card:has(.stage-edit) .item-eyebrow{padding-right:44px}
