:root {
  --ink: #19372c;
  --muted: #718078;
  --green: #245c45;
  --line: #dce5df;
  --paper: #f7f9f5;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  color: var(--ink);
  background: var(--paper);
  scrollbar-gutter: stable;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #90b7a3; outline-offset: 3px; }
.brand { font-family: "Ma Shan Zheng", "Noto Serif SC", serif; font-size: 34px; }
.eyebrow { margin: 0 0 12px; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #668574; }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; background: var(--green); color: white; min-height: 48px; padding: 12px 20px; font-weight: 500; transition: background .2s, transform .15s, box-shadow .2s; }
.primary:hover { background: #194a35; }
.primary:not(:disabled):active { transform: translateY(1px) scale(.99); }
.primary.is-pending:disabled { opacity: .88; cursor: wait; }
.primary.is-success { background: #2f7851; animation: confirm-pop .32s ease; }
.primary.is-error, .secondary.is-error { background: #a94e4e; border-color: #a94e4e; color: white; animation: feedback-shake .36s ease; }
.secondary { transition: border-color .2s, background .2s, color .2s, transform .15s; }
.secondary:not(:disabled):active { transform: translateY(1px) scale(.99); }
button i { font-style: normal; }
.button-spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: button-spin .7s linear infinite; }
@keyframes button-spin { to { transform: rotate(360deg); } }
@keyframes feedback-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
@keyframes confirm-pop { 0% { transform: scale(.97); } 60% { transform: scale(1.02); } 100% { transform: scale(1); } }
label { display: grid; gap: 8px; font-size: 13px; font-weight: 500; }
input, select { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: white; padding: 12px 14px; }
.form-message { min-height: 20px; margin: 0; color: #a34444; font-size: 13px; }

.gate { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.welcome { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 48px 7vw; background: #e2eee5; }
.welcome h1 { margin: 0 0 24px; font-family: "Ma Shan Zheng", "Noto Serif SC", serif; font-size: clamp(52px, 6vw, 82px); font-weight: 400; line-height: 1.25; }
.welcome p:last-child { color: #577265; line-height: 1.8; }
.leaf-pattern { position: absolute; right: -110px; bottom: -140px; width: 390px; height: 390px; border: 1px solid #c3d9c9; border-radius: 70% 0 70% 0; transform: rotate(25deg); }
.leaf-pattern::before, .leaf-pattern::after { content: ""; position: absolute; border: 1px solid #c3d9c9; border-radius: 70% 0 70% 0; }
.leaf-pattern::before { inset: 55px; }
.leaf-pattern::after { inset: 110px; }
.auth-sheet { display: grid; place-items: center; padding: 40px; background: white; }
.auth-form { display: grid; gap: 20px; width: min(100%, 380px); }
.auth-form h2 { margin: 0; font-size: 32px; font-weight: 500; }
.modes { display: flex; gap: 24px; margin-bottom: 8px; }
.modes button { padding: 5px 0; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); }
.modes button[aria-selected="true"] { color: var(--green); border-color: var(--green); }

.shell { min-height: 100vh; background: radial-gradient(circle at 85% 5%, #eaf1e7 0, transparent 32%), var(--paper); }
.topbar { height: 88px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(28px, calc((100% - 1120px) / 2)); border-bottom: 1px solid var(--line); }
.account { display: flex; align-items: center; gap: 22px; font-size: 13px; color: var(--muted); }
.text-button { padding: 4px 0; border: 0; border-bottom: 1px solid currentColor; background: none; color: var(--green); font-size: 13px; }
.garden-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 42px; }
.garden-heading h1 { margin: 0 0 14px; font-family: "Ma Shan Zheng", "Noto Serif SC", serif; font-size: 48px; font-weight: 400; }
.garden-heading select { width: 180px; }
.connection { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #b3bdb6; }
.status-dot.online { background: #49956b; box-shadow: 0 0 0 4px #dcebe1; }
.level { margin-left: 8px; padding-left: 16px; border-left: 1px solid var(--line); }
.result { min-height: 28px; margin: 26px 0 0; padding: 0 4px; color: var(--muted); font-size: 14px; transition: color .2s; }
.result.visible { color: var(--green); }
.result[data-tone="error"].visible { color: #a34444; }
.result[data-tone="success"].visible { color: #2f7851; }
.harvest-times-content { min-height: 66px; }
.time-item-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.time-item-top span { overflow: hidden; font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.time-item-top small { flex-shrink: 0; color: #929d96; font-size: 10px; }
.times-empty { margin: 0; padding: 20px 0; color: var(--muted); font-size: 13px; }

.setup { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: #edf3ed; }
.setup-card { display: grid; gap: 20px; width: min(100%, 440px); padding: 42px; border-radius: 20px; background: white; box-shadow: 0 18px 60px #19372c12; }
.setup-card .brand { margin-bottom: 20px; }
.setup-card h1 { margin: 0; font-size: 30px; font-weight: 500; }
.setup-card > p:not(.eyebrow, .form-message) { margin: -8px 0 8px; color: var(--muted); font-size: 14px; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav-button { padding: 8px 0; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-size: 14px; }
.nav-button.active { border-color: var(--green); color: var(--green); }
.nav-button span { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 4px; border-radius: 10px; background: #e7eee8; font-size: 11px; }
.secondary { min-height: 42px; padding: 9px 18px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--green); }
.secondary:hover { border-color: #9eb6a7; }
.accounts-main { width: min(1120px, calc(100% - 56px)); margin: 0 auto; padding: 64px 0; }
.accounts-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 34px; }
.accounts-heading h1 { margin: 0 0 12px; font-family: "Ma Shan Zheng", "Noto Serif SC", serif; font-size: 46px; font-weight: 400; }
.accounts-heading > div > p:last-child { margin: 0; color: var(--muted); font-size: 14px; }
.add-account { flex-shrink: 0; }
.editor-card { display: grid; grid-template-columns: 180px 1fr; gap: 30px; margin-bottom: 24px; padding: 30px; border: 1px solid #cfddd2; border-radius: 16px; background: #f0f5ef; }
.editor-card h2 { margin: 0; font-size: 23px; font-weight: 500; }
.account-form { display: grid; gap: 16px; }
.editor-card .account-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.editor-card .form-actions, .editor-card .privacy-note { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; }
.form-actions .primary { min-height: 42px; }
.privacy-note { margin: 0; color: var(--muted); font-size: 12px; }
.account-list { display: grid; gap: 12px; margin-top: 24px; }
.game-account { display: flex; align-items: center; gap: 18px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.game-account.selected { border-color: #9ebca8; box-shadow: 0 0 0 2px #e3ede5; }
.account-avatar { display: grid; place-items: center; flex-shrink: 0; width: 46px; height: 46px; border-radius: 13px; background: #e8f0e7; color: #4e7156; font-family: "Ma Shan Zheng", serif; font-size: 24px; }
.game-account-info { flex: 1; min-width: 0; }
.game-account-info > div { display: flex; align-items: center; gap: 10px; }
.game-account-info h2 { overflow: hidden; margin: 0 0 5px; font-size: 17px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.game-account-info p { margin: 0 0 5px; color: var(--muted); font-size: 13px; }
.game-account-info small { color: #8a958e; font-size: 12px; }
.current-tag { padding: 2px 7px; border-radius: 4px; background: #e4efe6; color: var(--green); font-size: 10px; white-space: nowrap; }
.game-account-actions { display: flex; align-items: center; gap: 9px; }
.use-account { min-height: 42px; padding: 9px 18px; }
.remove-account { margin-left: 5px; color: #a15a5a; }

.schedules-main { width: min(1120px, calc(100% - 56px)); margin: 0 auto; padding: 64px 0; }
.schedules-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.schedules-heading > div { min-width: 0; }
.schedules-heading h1 { margin: 0 0 12px; font-family: "Ma Shan Zheng", "Noto Serif SC", serif; font-size: 46px; font-weight: 400; }
.schedules-heading > div > p:last-child { max-width: 660px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.schedule-section { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.schedule-section > header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.schedule-section h2 { margin: 0 0 7px; font-size: 23px; font-weight: 500; }
.schedule-section header p { margin: 0; color: var(--muted); font-size: 13px; }
.global-schedules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.schedule-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.schedule-card.active { border-color: #b7d1bf; background: #f5faf5; }
.schedule-card time { display: block; margin-bottom: 10px; color: var(--green); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; }
.schedule-card h3 { margin: 0 0 5px; font-size: 15px; font-weight: 500; }
.schedule-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.switch { position: relative; flex-shrink: 0; width: 40px; height: 23px; padding: 0; border: 0; border-radius: 20px; background: #d6ded8; transition: background .2s; }
.switch span { position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: white; box-shadow: 0 1px 3px #18301f26; transition: transform .2s; }
.switch.on { background: var(--green); }
.switch.on span { transform: translateX(17px); }
.custom-schedules, .run-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; }
.custom-schedule { display: flex; align-items: center; gap: 20px; padding: 17px 20px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.custom-schedule.disabled { opacity: .6; }
.custom-time { width: 76px; color: var(--green); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 20px; font-variant-numeric: tabular-nums; }
.custom-info { flex: 1; min-width: 0; }
.custom-info h3 { margin: 0 0 4px; font-size: 14px; font-weight: 500; }
.custom-info p { margin: 0; color: var(--muted); font-size: 12px; }
.custom-actions { display: flex; align-items: center; gap: 14px; }
.schedule-form { display: grid; grid-template-columns: 1.1fr 1fr 1fr .9fr; gap: 15px 18px; align-items: end; margin-bottom: 20px; padding: 22px; border: 1px solid #cfddd2; border-radius: 14px; background: #f0f5ef; }
.schedule-form > div:first-child { grid-column: 1 / -1; }
.schedule-form h3 { margin: 0; font-size: 18px; font-weight: 500; }
.schedule-form .form-actions { grid-column: 1 / -1; }
.run-header { align-items: end; }
.run-count { display: inline-grid; place-items: center; min-width: 21px; height: 21px; margin-left: 5px; padding: 0 6px; border-radius: 10px; background: #e7eee8; color: var(--green); font-size: 10px; font-weight: 500; vertical-align: 2px; }
.run-filter { display: flex; align-items: center; flex-direction: row; gap: 8px; flex-shrink: 0; color: var(--muted); font-size: 10px; font-weight: 400; }
.run-filter select { width: 155px; padding: 8px 10px; border-radius: 8px; font-size: 12px; }
.run-item { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 14px 18px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.run-status { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: #c5cec7; }
.run-account-avatar { display: grid; place-items: center; flex-shrink: 0; width: 31px; height: 31px; border-radius: 9px; color: #4b6855; font-family: "Ma Shan Zheng", serif; font-size: 17px; }
.run-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 4px; }
.run-heading strong { overflow: hidden; font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.run-client-tag { padding: 2px 6px; border-radius: 4px; background: #edf3ed; color: #587360; font-size: 9px; white-space: nowrap; }
.run-status.success { background: #4c9a6b; box-shadow: 0 0 0 4px #e3efe5; }
.run-status.failed { background: #b85b5b; box-shadow: 0 0 0 4px #f5e5e5; }
.run-status.running { background: #b69c53; }
.run-status.skipped { background: #7b8996; box-shadow: 0 0 0 4px #edf0f3; }
.run-item > div { flex: 1; min-width: 0; }
.run-item strong { display: block; overflow: hidden; margin-bottom: 3px; font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.run-item p { overflow: hidden; margin: 0; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.run-item > time { flex-shrink: 0; color: #929d96; font-size: 11px; font-variant-numeric: tabular-nums; }

.schedules-heading select { width: 240px; flex-shrink: 0; }
.uniform-times { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin: 24px 0; padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.uniform-times h2 { margin: 0 0 6px; font-size: 16px; font-weight: 500; }
.uniform-times p { margin: 0; color: var(--muted); font-size: 11px; }
.time-pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.time-pills span { padding: 6px 9px; border-radius: 6px; background: #edf3ed; color: #60796a; font-size: 10px; }
.time-pills b { margin-left: 4px; color: var(--green); font-family: ui-monospace, Consolas, monospace; font-size: 11px; }
.automation-tabs { display: inline-flex; gap: 4px; margin: 22px 0 0; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: #eef3ed; }
.automation-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 104px; padding: 8px 16px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 12px; transition: background .2s, color .2s, box-shadow .2s; }
.automation-tabs button.active { background: white; color: var(--green); box-shadow: 0 2px 8px #1b3d2b12; }
.tab-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #dde9df; color: #587360; font-size: 9px; font-weight: 500; }
.automation-tabs button.active .tab-count { background: #e4efe6; color: var(--green); }
.automation-context { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 22px 0 16px; padding: 20px 22px; border: 1px solid #cfddd2; border-radius: 14px; background: #f2f7f1; }
.automation-context h2 { margin: 0 0 5px; font-size: 20px; font-weight: 500; }
.automation-context p:last-child { margin: 0; color: var(--muted); font-size: 11px; }
.inherit-pill { display: inline-block; padding: 3px 8px; border-radius: 5px; background: #e1eee4; color: var(--green); font-size: 9px; white-space: nowrap; }
.inherit-banner { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin: 22px 0 16px; padding: 20px 22px; border: 1px solid #cfddd2; border-radius: 14px; background: #f2f7f1; }
.inherit-banner.editing { border-color: #d8cfa9; background: #faf8ec; }
.inherit-banner h2 { margin: 6px 0 5px; font-size: 19px; font-weight: 500; }
.inherit-banner p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.inherit-actions { flex-shrink: 0; }
.override-tag { display: inline-block; margin-left: 7px; padding: 2px 5px; border-radius: 4px; background: #f3e9c7; color: #8b712e; font-size: 8px; font-style: normal; font-weight: 500; vertical-align: 1px; }
.setting-row.is-overridden, .setting-number.is-overridden, .setting-picker.is-overridden { background: #fffbef; box-shadow: inset 2px 0 #d4b96d; }
.automation-form.is-locked .automation-group { background: #fbfcfa; }
.automation-form.is-locked .setting-row, .automation-form.is-locked .setting-number, .automation-form.is-locked .setting-picker { opacity: .78; }
.automation-form.is-locked input:disabled { background: #f4f6f3; color: #758278; }
.automation-form.is-locked .toggle-track, .automation-form.is-locked .flower-picker-trigger { cursor: default; }
.automation-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.automation-sections { position: sticky; top: 8px; z-index: 6; display: flex; gap: 4px; overflow-x: auto; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #eef3ed; box-shadow: 0 8px 24px #19372c0d; scrollbar-width: none; overscroll-behavior-x: contain; }
.automation-sections::-webkit-scrollbar { display: none; }
.automation-sections button { display: flex; flex: 1 0 72px; align-items: center; justify-content: center; gap: 5px; min-height: 42px; padding: 9px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 12px; white-space: nowrap; transition: background .2s, color .2s, box-shadow .2s; }
.automation-sections button:hover { color: var(--green); }
.automation-sections button.active { background: white; color: var(--green); box-shadow: 0 2px 8px #1b3d2b12; }
.section-count { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #f3e9c7; color: #8b712e; font-size: 9px; font-weight: 500; }
.automation-group { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: white; }
.automation-group > header { padding: 19px 19px 14px; border-bottom: 1px solid #edf1ee; }
.automation-group > header .eyebrow { margin-bottom: 5px; }
.automation-group h2 { margin: 0; font-size: 18px; font-weight: 500; }
.setting-row, .setting-number { position: relative; display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 15px 18px; border-bottom: 1px solid #f0f3f0; cursor: pointer; }
.setting-row:last-child, .setting-number:last-child { border-bottom: 0; }
.setting-row > span, .setting-number > span { flex: 1; min-width: 0; }
.setting-row strong, .setting-number strong { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 500; line-height: 1.5; }
.setting-row small, .setting-number small { display: block; color: var(--muted); font-size: 11px; line-height: 1.65; }
.setting-row input[type="checkbox"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.setting-row input:focus-visible + .toggle-track { outline: 3px solid #90b7a3; outline-offset: 3px; }
.toggle-track { position: relative; flex-shrink: 0; width: 40px; height: 24px; border-radius: 20px; background: #d7dfd9; transition: background .2s; }
.toggle-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: white; box-shadow: 0 1px 3px #18301f26; transition: transform .2s; }
.setting-row input:checked + .toggle-track { background: var(--green); }
.setting-row input:checked + .toggle-track::after { transform: translateX(16px); }
.setting-row.unavailable { cursor: default; background: #fafbf9; }
.setting-row.unavailable em { flex-shrink: 0; padding: 3px 7px; border-radius: 4px; background: #f0f1ef; color: #969d97; font-size: 9px; font-style: normal; }
.setting-number input { flex-shrink: 0; width: 84px; min-height: 40px; padding: 8px 9px; border-radius: 8px; text-align: right; font-size: 13px; }
.automation-group[data-automation-panel="guild"] > h3 { margin: 0; padding: 18px 18px 10px; border-bottom: 1px solid #edf1ee; background: #f7faf6; color: var(--green); font-size: 13px; font-weight: 500; }
.automation-group[data-automation-panel="guild"] > p { margin: 0; padding: 12px 18px; color: var(--muted); font-size: 11px; }
.automation-group[data-automation-panel="guild"] .setting-number select { max-width: 170px; min-height: 40px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: white; font: inherit; font-size: 12px; }
.automation-group[data-automation-panel="guild"] .setting-number:has(textarea) { align-items: stretch; flex-direction: column; cursor: default; }
.automation-group[data-automation-panel="guild"] textarea { width: 100%; min-height: 104px; resize: vertical; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 12px; line-height: 1.8; }
.setting-picker { display: grid; gap: 10px; padding: 15px 18px; border-bottom: 1px solid #f0f3f0; }
.setting-picker > span { display: block; }
.setting-picker strong { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 500; line-height: 1.5; }
.setting-picker small { display: block; color: var(--muted); font-size: 11px; line-height: 1.65; }
.flower-picker-trigger { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 46px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #f8faf7; text-align: left; transition: border-color .2s, background .2s, transform .15s; }
.flower-picker-trigger:hover { border-color: #9fbba8; background: #f3f8f2; }
.flower-picker-trigger:active { transform: scale(.99); }
.flower-picker-trigger.chosen { border-color: #b8d0bf; background: #f2f8f2; }
.flower-picker-mark { display: grid; place-items: center; flex-shrink: 0; width: 29px; height: 29px; border-radius: 9px; background: #e4efe5; color: #4e7656; font-family: "Ma Shan Zheng", serif; font-size: 17px; font-style: normal; }
.flower-picker-name { flex: 1; min-width: 0; overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.flower-picker-trigger em { flex-shrink: 0; margin-left: auto; color: #8a978e; font-family: ui-monospace, Consolas, monospace; font-size: 9px; font-style: normal; }
.flower-picker-trigger b { flex-shrink: 0; padding: 3px 7px; border-radius: 5px; background: #e5efe6; color: var(--green); font-size: 9px; font-weight: 500; }
.automation-save { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 4px 0; }
.automation-save span { color: var(--muted); font-size: 12px; line-height: 1.65; }
.automation-save .primary { min-height: 44px; }
.automation-runs { margin-top: 22px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.automation-runs > header { margin-bottom: 20px; }
.automation-runs h2 { font-size: 23px; }
.automation-runs .run-list { min-height: 72px; }

@media (min-width: 1021px) {
  .automation-form { grid-template-columns: 190px minmax(0, 1fr); gap: 18px 20px; }
  .automation-sections { grid-column: 1; grid-row: 1 / span 2; align-self: start; flex-direction: column; overflow: visible; top: 20px; }
  .automation-sections button { flex: 0 0 auto; justify-content: space-between; padding: 11px 14px; text-align: left; }
  .automation-group, .automation-save { grid-column: 2; }
}
@media (max-width: 1020px) {
  .global-schedules { grid-template-columns: 1fr; }
  .schedule-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .uniform-times { flex-direction: column; gap: 14px; }
  .time-pills { justify-content: flex-start; }
  .inherit-banner { align-items: flex-start; flex-direction: column; }
  .inherit-actions { width: 100%; }
  .automation-context { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 720px) {
  .gate { grid-template-columns: 1fr; }
  .welcome { min-height: 260px; padding: 30px; }
  .welcome > div:nth-child(2) { margin-top: 48px; }
  .welcome h1 { font-size: 46px; }
  .welcome p:last-child, .leaf-pattern { display: none; }
  .auth-sheet { padding: 42px 28px; }
  .topbar { height: auto; min-height: 72px; flex-wrap: wrap; gap: 12px; padding: 16px; }
  .topbar .brand { font-size: 28px; }
  .nav { order: 3; width: 100%; justify-content: space-between; gap: 12px; }
  .account { margin-left: auto; }
  .account > span { display: none; }
  .schedules-main { width: calc(100% - 36px); padding: 38px 0; }
  .schedules-heading { align-items: stretch; flex-direction: column; gap: 18px; }
  .schedules-heading h1 { font-size: 36px; }
  .schedules-heading > div > p:last-child { max-width: none; font-size: 13px; line-height: 1.7; }
  .schedules-heading select { width: 100%; min-height: 46px; }
  .automation-tabs { display: flex; width: 100%; margin-top: 18px; }
  .automation-tabs button { flex: 1; min-width: 0; min-height: 42px; padding-right: 8px; padding-left: 8px; }
  .automation-runs { margin-top: 18px; padding: 18px; border-radius: 13px; }
  .automation-runs h2 { font-size: 20px; }
  .schedules-main > .result { margin-top: 16px; }
  .schedules-heading .primary { padding: 10px 13px; font-size: 13px; }
  .uniform-times { gap: 12px; margin: 18px 0; padding: 16px; }
  .time-pills { width: 100%; }
  .time-pills span { font-size: 11px; line-height: 1.5; }
  .automation-context, .inherit-banner { gap: 14px; margin: 18px 0 14px; padding: 16px; }
  .automation-context h2, .inherit-banner h2 { font-size: 18px; }
  .automation-context p:last-child, .inherit-banner p { font-size: 12px; line-height: 1.7; }
  .automation-context .inherit-pill { white-space: normal; line-height: 1.6; }
  .inherit-actions, .inherit-actions button, .inherit-banner > button { width: 100%; }
  .automation-form { grid-template-columns: 1fr; gap: 14px; }
  .automation-group { border-radius: 13px; }
  .automation-group > header { padding: 16px 16px 13px; }
  .automation-group h2 { font-size: 17px; }
  .setting-row, .setting-number, .setting-picker { padding-right: 16px; padding-left: 16px; }
  .setting-row, .setting-number { gap: 12px; }
  .automation-save { align-items: stretch; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fffffff2; box-shadow: 0 8px 24px #19372c0a; }
  .automation-save .primary { width: 100%; min-height: 48px; }
  .schedule-form { grid-template-columns: 1fr; }
  .schedule-form > div:first-child, .schedule-form .form-actions { grid-column: auto; }
  .custom-schedule { flex-wrap: wrap; gap: 12px; }
  .custom-time { width: 62px; font-size: 18px; }
  .custom-info { min-width: calc(100% - 86px); }
  .custom-actions { width: 100%; padding-top: 12px; border-top: 1px solid var(--line); }
  .custom-actions .remove-account { margin-left: auto; }
  .run-header { flex-wrap: wrap; }
  .run-filter { width: 100%; }
  .run-filter select { flex: 1; width: auto; }
  .run-item { align-items: flex-start; }
  .run-item > div { padding-top: 2px; }
  .flower-modal { padding: 12px; }
  .flower-dialog { max-height: 92vh; border-radius: 16px; }
  .flower-dialog > header { padding: 20px 19px 15px; }
  .flower-dialog h2 { font-size: 26px; }
  .flower-search { margin: 14px 19px 10px; }
  .flower-results { padding: 4px 19px 20px; }
  .flower-grid { grid-template-columns: 1fr; gap: 7px; }
  .flower-dialog > footer { padding: 12px 19px 16px; }
  .flower-dialog > footer span { display: none; }
  .run-item > time { display: none; }
  .accounts-main { width: calc(100% - 36px); padding: 38px 0; }
  .accounts-heading { align-items: flex-start; }
  .accounts-heading h1 { font-size: 38px; }
  .accounts-heading > div > p:last-child { max-width: 230px; line-height: 1.6; }
  .add-account { padding: 10px 13px; font-size: 13px; }
  .editor-card { grid-template-columns: 1fr; gap: 22px; padding: 24px; }
  .editor-card .account-form { grid-template-columns: 1fr; }
  .editor-card .form-actions, .editor-card .privacy-note { grid-column: auto; }
  .game-account { flex-wrap: wrap; padding: 20px; }
  .game-account-info { min-width: calc(100% - 70px); }
  .game-account-actions { width: 100%; padding-top: 14px; border-top: 1px solid var(--line); }
  .game-account-actions .remove-account { margin-left: auto; }
  .garden-heading { align-items: start; margin-bottom: 28px; }
  .garden-heading h1 { font-size: 38px; }
  .garden-heading select { width: 130px; }
  .time-item-top { align-items: flex-start; flex-direction: column; gap: 3px; }
  .setup-card { padding: 30px 24px; }
}
body.modal-open { overflow: hidden; }
.flower-modal { position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center; padding: 24px; }
.flower-modal-backdrop { position: absolute; inset: 0; background: #10251b73; backdrop-filter: blur(4px); opacity: 0; transition: opacity .2s; }
.flower-dialog { position: relative; display: flex; flex-direction: column; width: min(780px, 100%); max-height: min(720px, 90vh); overflow: hidden; border: 1px solid #d9e5dc; border-radius: 20px; background: #fbfdf9; box-shadow: 0 30px 90px #0c201630; opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .2s, transform .2s; }
.flower-modal.open .flower-modal-backdrop { opacity: 1; }
.flower-modal.open .flower-dialog { opacity: 1; transform: translateY(0) scale(1); }
.flower-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 26px 18px; border-bottom: 1px solid var(--line); }
.flower-dialog h2 { margin: 0 0 6px; font-family: "Ma Shan Zheng", "Noto Serif SC", serif; font-size: 30px; font-weight: 400; }
.flower-dialog header p:last-child { margin: 0; color: var(--muted); font-size: 11px; }
.flower-close { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #eef3ed; color: #63776a; font-size: 22px; line-height: 1; }
.flower-close:hover { background: #e4ece4; color: var(--ink); }
.flower-search { display: flex; align-items: center; gap: 8px; margin: 18px 26px 12px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.flower-search:focus-within { border-color: #93b6a1; box-shadow: 0 0 0 3px #e3efe6; }
.flower-search span { color: #8aa095; font-size: 22px; line-height: 1; }
.flower-search input { border: 0; padding: 12px 0; background: transparent; outline: 0; box-shadow: none; font-size: 13px; }
.flower-results { flex: 1; min-height: 140px; overflow-y: auto; padding: 4px 26px 24px; }
.flower-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.flower-option { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px; border: 1px solid #e3ebe5; border-radius: 11px; background: white; text-align: left; transition: border-color .16s, background .16s, transform .16s; }
.flower-option:hover { border-color: #a9c4b1; background: #f7fbf7; transform: translateY(-1px); }
.flower-option.selected { border-color: #7ea88d; background: #f0f8f1; box-shadow: 0 0 0 2px #e3f0e6; }
.flower-thumb { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px; color: #426851; font-family: "Ma Shan Zheng", serif; font-size: 19px; }
.hue-0 { background: #e7f0e1; } .hue-1 { background: #f4e9df; } .hue-2 { background: #e1edf0; } .hue-3 { background: #f1e6ec; } .hue-4 { background: #eff0dc; } .hue-5 { background: #e6e9f2; }
.flower-option-copy { flex: 1; min-width: 0; }
.flower-option-copy strong { display: block; overflow: hidden; margin-bottom: 3px; font-size: 12px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.flower-option-copy small { display: block; overflow: hidden; color: #8a978e; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.flower-option > em { flex-shrink: 0; color: #91a096; font-family: ui-monospace, Consolas, monospace; font-size: 8px; font-style: normal; }
.flower-dialog > footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 26px 18px; border-top: 1px solid var(--line); }
.flower-dialog > footer span { color: var(--muted); font-size: 10px; }
.flower-loading { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 160px; color: var(--muted); font-size: 12px; }
.flower-loading .button-spinner { width: 17px; height: 17px; color: var(--green); }
.flower-empty { margin: 0; padding: 42px 12px; color: var(--muted); font-size: 12px; text-align: center; }
.excluded-flower-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 100px; overflow-y: auto; padding: 0 22px 12px; }
.excluded-flower-chips[hidden] { display: none; }
.excluded-flower-chips button { padding: 5px 9px; border: 1px solid #bfd3c4; border-radius: 8px; background: #f0f7f1; color: var(--green); font-size: 12px; }
.excluded-flower-chips small { color: var(--muted); }
.toast-stack { position: fixed; right: 26px; bottom: 26px; z-index: 1200; display: grid; gap: 10px; width: min(380px, calc(100vw - 36px)); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 11px; padding: 14px 16px; border: 1px solid #c8ddce; border-radius: 12px; background: #f5fbf6; box-shadow: 0 14px 38px #18301f24; color: #214d37; font-size: 13px; line-height: 1.55; opacity: 0; transform: translateY(10px) scale(.98); transition: opacity .2s, transform .2s; pointer-events: auto; cursor: pointer; }
.toast.show { opacity: 1; transform: translateY(0) scale(1); }
.toast i { display: grid; place-items: center; flex-shrink: 0; width: 20px; height: 20px; margin-top: 0; border-radius: 50%; background: #2f7851; color: white; font-size: 12px; font-style: normal; font-weight: 700; }
.toast.error { border-color: #e2c2c2; background: #fff7f7; color: #7e3636; }
.toast.error i { background: #a94e4e; }
@media (max-width: 720px) {
  .toast-stack { right: 18px; bottom: 18px; width: calc(100vw - 36px); }
}
@media (prefers-reduced-motion: reduce) {
  .toast, .primary, .secondary { transition: none; }
  .primary.is-success, .primary.is-error, .secondary.is-error, .button-spinner { animation: none; }
}

