/* A small paper planner and a quiet room, using the house's existing palette. */
.calendar-card, .todo-card, .focus-card, .planner-study, .planner-task-dialog {
  --planner-sage: #778769;
  --planner-peach: #cd9175;
  --planner-muted: #8a7867;
  --planner-line: #e8ded0;
}
.planner-eyebrow { display: block; color: var(--planner-muted); font-size: 10.5px; letter-spacing: .05em; line-height: 1.7; }
.calendar-card { padding: 16px 16px 10px; }
.planner-calendar-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.calendar-card #calendarMonth { margin: 4px 0 0; font: 24px var(--font-display); }
.planner-view-switch { display: flex; padding: 3px; border: 1px solid #e6dccd; border-radius: 12px; background: #f2ecdf; }
.planner-view-switch button { min-width: 34px; min-height: 32px; border: 0; border-radius: 9px; background: transparent; color: #8a7768; font-size: 13px; }
.planner-view-switch button[aria-pressed="true"] { background: #fffaf1; color: #5b4034; box-shadow: 0 1px 3px #634c3320; font-weight: 600; }
.planner-calendar-nav { display: flex; align-items: center; gap: 2px; margin: 13px -5px 2px; }
.planner-calendar-nav > span { flex: 1; color: var(--planner-muted); font-size: 11px; }
.planner-calendar-nav .icon-button { height: 34px; width: 32px; font: 23px var(--font-body); }
.planner-calendar-nav #calendarToday { min-height: 32px; padding: 3px 9px; border: 1px solid var(--planner-line); border-radius: 9px; font-size: 11px; }
.calendar-card .week-labels { padding: 4px 0 8px; font-size: 11px; }
.calendar-card .week-labels > :nth-last-child(-n+2) { color: #b98e79; }
.calendar-card .calendar-days { gap: 2px 0; }
.calendar-card .calendar-days button { width: 100%; max-width: 43px; height: 43px; border-radius: 13px 11px 14px 12px; display: flex; flex-direction: column; justify-content: center; gap: 2px; font: 16px var(--font-body); line-height: 1.2; }
.calendar-card .calendar-days button[aria-pressed="true"] { background: #7d896d; box-shadow: 0 2px 0 #68775435; }
.calendar-card .calendar-days button[aria-current="date"]:not([aria-pressed="true"]) { outline: 1px solid #929d80; outline-offset: -3px; color: #647250; }
.calendar-card .calendar-days button.planner-outside:not([aria-pressed="true"]) { color: #b7ab9e; }
.planner-day-dots { display: flex; height: 4px; align-items: center; justify-content: center; gap: 3px; }
.planner-dot { display: inline-block; width: 4px; height: 4px; border-radius: 50%; flex: none; }
.task-dot { background: var(--planner-peach); }
.focus-dot { background: var(--planner-sage); }
.calendar-days [aria-pressed="true"] .task-dot { background: #f5c59b; }
.calendar-days [aria-pressed="true"] .focus-dot { background: #e8eccf; }
.planner-calendar-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px; margin-top: 12px; padding-top: 9px; border-top: 1px dashed var(--planner-line); color: var(--planner-muted); font-size: 10px; }
.planner-calendar-foot > span:first-child { display: flex; align-items: center; gap: 5px; }
.planner-calendar-foot .focus-dot { margin-left: 4px; }
.calendar-card .full-month { padding-bottom: 0; }

.todo-card { padding: 15px 16px 12px; }
.todo-card #todoTitle { margin-top: 3px; font-size: 21px; }
#plannerTaskCount { font: 11px var(--font-body); color: #9b8a78; padding-left: 4px; }
.planner-add { display: inline-flex; align-items: center; gap: 3px; min-height: 35px; padding: 6px 9px; background: #f0e7da; border: 1px solid #e4d7c4; border-radius: 11px; font-size: 11px; white-space: nowrap; }
.planner-add .ui-icon { width: 14px; height: 14px; }
.planner-tasks { margin-top: 12px; }
.planner-tasks .planner-task { display: flex; align-items: center; gap: 6px; min-height: 55px; }
.planner-tasks .planner-task label { flex: 1; min-width: 0; gap: 10px; padding: 8px 0; }
.planner-tasks .planner-task label span { font-size: 13px; line-height: 1.6; }
.planner-tasks input[type="checkbox"], .study-complete-task input { width: 19px; height: 19px; accent-color: #798866; }
.planner-task.is-done label span { color: #a09685; }
.planner-task-actions { display: flex; flex: none; gap: 2px; }
.planner-task-actions button { display: grid; place-items: center; width: 32px; height: 34px; padding: 7px; border: 0; border-radius: 10px; background: transparent; color: #978572; }
.planner-task-actions button:hover { background: #eee7d9; }
.planner-task-actions .planner-task-start { background: #edf0e1; color: #7c8868; }
.planner-task-actions svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.planner-task-start svg { fill: currentColor; stroke: none; }
.planner-empty { display: flex; flex-direction: column; gap: 5px; padding: 23px 0 14px; color: #8e7a65; font-size: 12px; line-height: 1.6; }
.planner-empty small { font-size: 10px; color: #a79682; }
.planner-undo { font-size: 11px; margin-top: 8px; color: #8a765e; }
.planner-records { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--planner-line); }
.planner-records summary { display: flex; justify-content: space-between; align-items: center; gap: 5px; cursor: pointer; font-size: 11px; color: #7d896c; list-style: none; }
.planner-records summary::-webkit-details-marker { display: none; }
.planner-records summary::after { content: '⌄'; font-size: 16px; margin-left: 2px; }
.planner-records[open] summary::after { transform: rotate(180deg); }
.planner-records summary span:first-child { margin-right: auto; }
.planner-records ol { list-style: none; padding: 0; margin: 8px 0 0; }
.planner-records li { display: flex; align-items: center; gap: 8px; padding: 9px 0; }
.planner-records li > div { min-width: 0; flex: 1; }
.planner-records b { display: block; font-size: 11px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.planner-records small { display: block; font-size: 10px; color: #a08f7d; margin-top: 3px; }
.planner-records strong { font-size: 11px; font-weight: 500; color: #788467; white-space: nowrap; }
.planner-record-mark { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 50%; color: #7d896c; background: #eef1e4; }
.planner-record-mark .ui-icon { width: 12px; height: 12px; }

.focus-card { display: block; position: relative; overflow: hidden; padding: 14px 16px 12px; background: #edf0e2; border-color: #d8ddc8; }
.planner-focus-top { display: flex; align-items: center; justify-content: space-between; gap: 7px; color: #7d896b; }
.planner-room-label { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; letter-spacing: .03em; }
.planner-room-label .ui-icon { width: 14px; height: 14px; }
.planner-focus-today { font-size: 10px; }
.planner-focus-main { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 97px; gap: 0; }
.planner-focus-main > div { z-index: 1; flex: 1; min-width: 0; }
.focus-card #focusTitle { font-size: 21px; line-height: 1.4; margin: 8px 0 5px; }
.focus-card #focusNote { font-size: 11px; line-height: 1.7; color: #8c886d; overflow-wrap: anywhere; max-width: 260px; }
.planner-card-cat { width: 88px; height: 90px; flex: none; object-fit: contain; object-position: center 60%; margin: 0 -6px 0 0; }
.planner-focus-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px dashed #d5dac4; padding-top: 10px; }
.planner-focus-bottom > span { font-size: 10px; color: #929275; line-height: 1.6; }
.planner-focus-bottom .primary-button { min-height: 35px; border-radius: 13px; padding: 7px 12px; background: #7c8968; font-size: 11px; font-weight: 500; }
.planner-focus-bottom .primary-button:hover { background: #697957; }
.planner-focus-bottom .ui-icon { width: 13px; height: 13px; margin-left: 5px; transform: rotate(180deg); }
.focus-card.planner-focus-active { border-color: #aab69a; }
.focus-card #focusTime { font-family: var(--font-body); font-weight: 500; font-size: 32px; color: #697955; margin-bottom: 4px; }
.planner-task-dialog input[type="text"], .planner-task-dialog input[type="date"] { width: 100%; min-height: 46px; padding: 10px 12px; background: #fffdf8; border: 1px solid #d8c9b5; border-radius: 12px; color: #634c3a; font: 14px var(--font-body); }
.planner-task-dialog h2 { margin-top: 7px; }
.planner-task-dialog .planner-delete { display: block; margin: 18px auto 0; font-size: 12px; color: #a47b68; }
.planner-form-error { color: #ae6c50 !important; font-size: 11px !important; line-height: 1.6; margin: 0; }
.planner-form-error:empty { display: none; }

.planner-study { position: fixed; inset: 0; width: 100%; max-width: 520px; height: 100%; height: 100dvh; max-height: 100dvh; margin: 0 auto; padding: 0; border: 0; color: #5b4034; background: #f5f0e6; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.planner-study::backdrop { background: #584b3e66; backdrop-filter: blur(4px); }
.study-shell { min-height: 100%; display: flex; flex-direction: column; background-image: radial-gradient(#bcab8726 .6px, transparent .6px); background-size: 7px 7px; }
.study-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: calc(18px + env(safe-area-inset-top, 0px)) 22px 12px; }
.study-header .text-button { font-size: 11px; min-height: 36px; }
.study-header .text-button .ui-icon { width: 14px; height: 14px; }
.study-header > span:not(.study-quiet) { font: 18px var(--font-display); }
.study-quiet { font-size: 9px; color: #929474; border: 1px solid #dedfcf; padding: 5px 7px; border-radius: 12px; background: #eff0e4; white-space: nowrap; }
.study-scene { position: relative; width: 100%; max-width: 350px; height: 155px; margin: 0 auto 4px; isolation: isolate; }
.study-window { position: absolute; width: 82px; height: 92px; top: 6px; left: 50%; transform: translateX(-50%); overflow: hidden; border: 4px solid #dac5a5; border-radius: 42px 42px 2px 2px; background: #dce7e2; box-shadow: 0 2px 0 #bba28344; }
.study-window::before, .study-window::after { content: ''; position: absolute; background: #dac5a5; z-index: 2; }
.study-window::before { width: 3px; height: 100%; left: 50%; }
.study-window::after { width: 100%; height: 3px; top: 46%; }
.study-window span { position: absolute; right: 12px; top: 10px; width: 23px; height: 23px; border-radius: 50%; background: #f8e8b7; box-shadow: 0 0 15px #fff2d6; }
.study-window i { position: absolute; bottom: 9px; left: -7px; width: 95px; height: 34px; border-radius: 50%; background: #c4d2b6; transform: rotate(-15deg); }
.study-surface { position: absolute; left: 9%; right: 9%; height: 19px; bottom: 12px; border-radius: 50%; background: #e3d7bb99; }
.study-cat { position: absolute; left: 50%; bottom: 13px; width: 143px; height: 115px; transform: translateX(-50%); object-fit: contain; z-index: 3; }
.study-books { position: absolute; left: 13%; bottom: 19px; width: 64px; height: 59px; object-fit: contain; transform: rotate(-6deg); z-index: 4; }
.study-lamp { position: absolute; right: 12%; bottom: 21px; width: 57px; height: 76px; object-fit: contain; z-index: 2; }
.study-content { width: 100%; max-width: 420px; padding: 0 27px 15px; margin: 0 auto; text-align: center; }
.study-kicker { display: inline-block; margin: 3px 0 9px; font-size: 10px; letter-spacing: .08em; color: #a18f76; }
.study-content > h2 { margin: 0; font: 27px/1.4 var(--font-display); }
.study-caption { font-size: 11px; line-height: 1.8; color: #96836f; margin: 7px 0 20px; overflow-wrap: anywhere; }
#studySetup { display: flex; flex-direction: column; gap: 9px; text-align: left; }
#studySetup > label, .study-durations legend { font-size: 11px; color: #7c6955; margin-top: 5px; }
#studySetup > label span { color: #aa9b85; font-size: 10px; margin-left: 6px; }
#studySetup > input, #studySetup > select { width: 100%; min-height: 43px; background: #fffbf2; border: 1px solid #e0d4c1; border-radius: 12px; color: #755d48; padding: 10px 12px; font: 12px var(--font-body); }
#studySetup > input::placeholder { color: #b0a08d; }
.study-durations { padding: 0; border: 0; min-width: 0; margin: 5px 0 9px; }
.study-durations legend { padding: 0; margin-bottom: 10px; }
.study-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.study-presets button { display: flex; justify-content: center; align-items: baseline; gap: 3px; min-height: 45px; border: 1px solid #e0d4c1; border-radius: 12px; background: #fffaf1; color: #967e64; padding: 9px 4px; font: 19px var(--font-display); }
.study-presets button small { font: 9px var(--font-body); }
.study-presets #studyCustom { align-items: center; font: 11px var(--font-body); }
.study-presets button[aria-pressed="true"] { border-color: #859574; background: #e9eddb; color: #62734f; box-shadow: 0 0 0 1px #859574; }
.study-custom-row { display: flex; align-items: center; gap: 10px; font-size: 10px; color: #978970; margin-top: 10px; }
.study-custom-row input { width: 83px; min-height: 40px; border: 1px solid #d3c7b1; border-radius: 10px; padding: 7px 10px; color: #725e47; background: #fffaf1; font: 16px var(--font-body); }
.study-primary { width: 100%; min-height: 47px; padding: 12px; background: #7c8b68; border-radius: 15px; box-shadow: 0 3px 0 #60734828; font-size: 13px; }
.study-primary:hover { background: #6c7e59; }
.study-small-note { text-align: center; font-size: 10px; line-height: 1.8; color: #a89a83; margin: 7px 0; }
.study-footer { margin-top: auto; padding: 14px 20px calc(20px + env(safe-area-inset-bottom, 0px)); text-align: center; color: #b3a48e; font-size: 10px; letter-spacing: .06em; }
.study-running-goal { display: inline-block; max-width: 100%; font-size: 12px; color: #796d56; line-height: 1.7; margin: 0 0 15px; padding: 6px 14px; border: 1px dashed #d9d2bc; border-radius: 12px; background: #f6f3e9; overflow-wrap: anywhere; }
.study-clock { --study-progress: 0%; display: grid; place-items: center; width: 219px; height: 219px; border-radius: 50%; margin: 2px auto 15px; padding: 6px; background: conic-gradient(from -90deg, #8b9d77 var(--study-progress), #e7e3d2 var(--study-progress)); box-shadow: 0 0 0 5px #fbf8ef; }
.study-clock > div { display: flex; width: 100%; height: 100%; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; background: #faf7ed; }
.study-clock span { color: #9b977c; font-size: 11px; letter-spacing: .12em; }
.study-clock output { color: #5e7050; font: 500 49px/1.6 var(--font-body); letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.study-clock small { color: #aaa087; font-size: 10px; }
.study-running-note { font-size: 11px; line-height: 1.8; color: #998e74; margin: 18px 0; }
.study-running-actions { display: flex; flex-direction: column; gap: 11px; }
.study-running-actions .text-button { font-size: 12px; min-height: 36px; }
.planner-study[data-break="true"] .study-clock { background: conic-gradient(from -90deg, #c29b70 var(--study-progress), #ede1cd var(--study-progress)); }
.planner-study[data-break="true"] .study-clock output { color: #a48055; }
.study-result-time { font: 36px/1.7 var(--font-display); color: #7b8d62; margin: 18px 0 0; }
.study-result-time.is-break { font-size: 29px; color: #b48e60; }
#studyResultNote { color: #9c8d76; font-size: 11px; margin: 7px 0 27px; }
.study-complete-task { display: flex; gap: 9px; align-items: center; text-align: left; background: #eef0e2; border: 1px dashed #cdd5bb; padding: 13px 12px; border-radius: 13px; margin: 0 0 24px; font-size: 12px; line-height: 1.7; cursor: pointer; }
.study-complete-task input { flex: none; margin: 0; }
.study-complete-task span { overflow-wrap: anywhere; min-width: 0; }
#studyResult .secondary-button { background: #f7f1e4; border-color: #e2d8c5; border-radius: 15px; min-height: 44px; color: #988469; font-size: 12px; margin-top: 12px; }
.study-record-link { display: flex; width: max-content; min-height: 40px; margin: 15px auto 0; font-size: 11px; }
@media (max-width: 350px) {
  .calendar-card, .todo-card, .focus-card { padding-inline: 12px; }
  .calendar-card .calendar-days button { height: 38px; font-size: 14px; }
  .planner-card-cat { width: 70px; }
  .focus-card #focusTitle { font-size: 19px; }
  .study-content { padding-inline: 20px; }
  .study-header { padding-inline: 16px; }
  .study-quiet { display: none; }
  .study-clock { width: 195px; height: 195px; }
}
@media (max-height: 750px) {
  .study-scene { height: 120px; margin-top: -3px; }
  .study-cat { width: 126px; height: 101px; }
  .study-window { height: 77px; width: 72px; top: 0; }
  .study-content > h2 { font-size: 24px; }
  .study-caption { margin-bottom: 14px; }
  .study-header { padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
  .study-footer { padding-top: 9px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
}

/* Once the timer starts, the illustration becomes the whole room. */
.study-backdrop { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.study-backdrop img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: var(--study-focal-x, 71%) center; filter: blur(1.6px); transform: scale(1.015); }
.study-backdrop::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, #352f2a30 0%, #3b363027 22%, #37322e40 50%, #39312c24 70%, #302c2b61 100%); }
.planner-study[data-mode="running"] { width: 100vw; max-width: none; overflow: hidden; background: #ada393; color: #fffdf8; }
.planner-study[data-mode="running"]::backdrop { background: #3c3832; }
.planner-study[data-mode="running"] .study-shell { position: relative; z-index: 1; height: 100%; min-height: 100%; background: none; }
.planner-study[data-mode="running"] .study-header { position: absolute; z-index: 3; top: 0; left: 0; right: 0; padding: calc(20px + env(safe-area-inset-top, 0px)) max(22px, env(safe-area-inset-right, 0px)) 0 max(22px, env(safe-area-inset-left, 0px)); display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; color: #fffdf4d9; }
.planner-study[data-mode="running"] .study-header > span:not(.study-quiet) { font: 13px var(--font-body); font-weight: 400; letter-spacing: .12em; text-shadow: 0 1px 8px #30271945; }
.planner-study[data-mode="running"] .study-header .text-button { justify-self: start; width: max-content; color: #fffdf4e6; font-size: 11px; text-shadow: 0 1px 8px #30271945; }
.planner-study[data-mode="running"] .study-header .study-quiet { justify-self: end; border: 0; background: none; color: #fffdf4c7; font-size: 10px; text-shadow: 0 1px 8px #30271945; padding: 0; }
.planner-study[data-mode="running"] .study-scene,
.planner-study[data-mode="running"] .study-kicker,
.planner-study[data-mode="running"] .study-content > h2,
.planner-study[data-mode="running"] .study-content > .study-caption,
.planner-study[data-mode="running"] .study-footer { display: none; }
.planner-study[data-mode="running"] .study-content { position: static; max-width: none; width: auto; margin: 0; padding: 0; }
.planner-study[data-mode="running"] #studyRunning { position: absolute; inset: 0; }
.planner-study[data-mode="running"] .study-running-goal { position: absolute; top: calc(50% - 142px); left: 50%; transform: translateX(-50%); width: max-content; max-width: min(500px, calc(100% - 60px)); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; border: 0; background: none; border-radius: 0; padding: 0; margin: 0; font-size: 13px; font-weight: 400; letter-spacing: .06em; line-height: 1.8; color: #fffef5e3; text-shadow: 0 1px 12px #3a302666; }
.planner-study[data-mode="running"] .study-clock { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(92vw, 680px); height: auto; margin: 0; padding: 0; background: none !important; border-radius: 0; box-shadow: none; }
.planner-study[data-mode="running"] .study-clock > div { width: 100%; height: auto; gap: 7px; border-radius: 0; background: none; }
.planner-study[data-mode="running"] .study-clock span { color: #fffef3c4; font-size: 11px; font-weight: 400; letter-spacing: .2em; text-shadow: 0 1px 9px #362a224d; }
.planner-study[data-mode="running"] .study-clock output { font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif; font-size: clamp(84px, 21vw, 146px); font-weight: 200; line-height: 1.2; font-variant-numeric: tabular-nums; letter-spacing: -.045em; color: #fffff6f5; text-shadow: 0 2px 24px #342f3040, 0 1px 3px #30282433; }
.planner-study[data-mode="running"] .study-clock small { color: #fffef3b5; font-size: 10px; letter-spacing: .05em; text-shadow: 0 1px 9px #362a223d; }
.planner-study[data-mode="running"] .study-running-note,
.planner-study[data-mode="running"] #studyRunning > .study-small-note { display: none; }
.planner-study[data-mode="running"] .study-running-actions { position: absolute; left: 20px; right: 20px; bottom: calc(104px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: row; justify-content: center; align-items: center; gap: 12px; }
.planner-study[data-mode="running"] .study-running-actions button { width: auto; min-height: 45px; border: 1px solid #fffef34f; border-radius: 25px; padding: 11px 22px; background: #fffaf02b; color: #fffdf6f0; box-shadow: 0 3px 20px #2925200a; backdrop-filter: blur(14px); font-size: 12px; font-weight: 400; text-shadow: 0 1px 5px #40332344; }
.planner-study[data-mode="running"] .study-running-actions .primary-button { min-width: 142px; background: #fffef042; border-color: #fffef36b; }
.planner-study[data-mode="running"] .study-running-actions button:hover { background: #fffef054; }
.planner-study[data-mode="running"] #studySaveError { position: absolute; z-index: 3; bottom: calc(163px + env(safe-area-inset-bottom, 0px)); left: 20px; right: 20px; color: #fff9e8 !important; text-shadow: 0 1px 6px #3d281f; }
.planner-study[data-mode="running"] :focus-visible { outline: 2px solid #fffef6; outline-offset: 4px; }

.study-environment { position: absolute; bottom: calc(25px + env(safe-area-inset-bottom, 0px)); left: 0; right: 0; z-index: 5; }
.study-environment-bar { display: flex; justify-content: center; align-items: center; gap: 9px; padding: 0 12px; }
.study-environment-bar button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 37px; padding: 8px 12px; background: #3d373624; color: #fffdf4d9; border: 1px solid #fffbeb26; border-radius: 20px; backdrop-filter: blur(9px); font: 11px var(--font-body); }
.study-environment-bar button:hover, .study-environment-bar button[aria-expanded="true"] { background: #fffcf234; }
.study-environment-bar .ui-icon { width: 14px; height: 14px; stroke-width: 1.4; }
.study-bar-divider { width: 1px; height: 13px; background: #fffdf535; }
#studySoundLight { width: 4px; height: 4px; background: #fffdf45c; border-radius: 50%; }
#studySoundLight.is-playing { background: #deefba; box-shadow: 0 0 6px #e5f5c775; }
.study-environment-panel { position: absolute; bottom: 57px; left: 50%; transform: translateX(-50%); width: min(352px, calc(100vw - 32px)); max-height: calc(100dvh - 142px); overflow: auto; padding: 16px; border: 1px solid #fffdf0c9; border-radius: 21px; background: #fffbf0f0; color: #6c5c4b; backdrop-filter: blur(20px); box-shadow: 0 10px 45px #44372735; }
.study-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -3px -3px 11px 0; }
.study-panel-heading h3 { font: 13px var(--font-body); font-weight: 500; margin: 0; }
.study-panel-heading .icon-button { color: #968671; width: 27px; height: 27px; }
.study-panel-heading .ui-icon { width: 16px; height: 16px; }
.study-scene-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.study-scene-options button { position: relative; border: 1.5px solid #e5daca; border-radius: 13px; padding: 3px 3px 7px; overflow: hidden; background: #fffaf0; color: #8a7561; text-align: left; }
.study-scene-options button img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 9px; }
.study-scene-options button span { display: block; padding: 7px 5px 0; font-size: 10px; }
.study-scene-options button .ui-icon { display: none; position: absolute; bottom: 8px; right: 7px; width: 13px; height: 13px; }
.study-scene-options button[aria-pressed="true"] { border-color: #899171; box-shadow: 0 0 0 1px #899171; color: #68744f; background: #f0f1e3; }
.study-scene-options button[aria-pressed="true"] .ui-icon { display: block; }
.study-sound-switch { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid #dcd3c3; background: #f0eadc; font-size: 12px; color: #8a775e; }
.study-sound-switch[aria-pressed="true"] { border-color: #ccd5b9; background: #eaf0de; color: #70825c; }
.study-mixer-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; margin-top: 19px; align-items: center; font-size: 11px; color: #8b775f; }
.study-mixer-row output { color: #a5967e; font-size: 10px; font-variant-numeric: tabular-nums; }
.study-mixer-row input { grid-column: 1 / -1; display: block; width: 100%; height: 22px; margin: 0; accent-color: #8a9878; cursor: pointer; background: transparent; }
.study-sound-status { margin: 15px 0 0; font-size: 10px; line-height: 1.8; color: #a6967d; }
#studyGlobalSound { font-size: 11px; margin-top: 8px; color: #827254; }
.planner-study[data-mode="running"] .study-environment-panel :focus-visible { outline-color: #7f8f6e; outline-offset: 2px; }
@media (min-aspect-ratio: 4 / 3) { .study-backdrop img { object-position: center 58%; } }
@media (min-width: 700px) {
  .planner-study[data-mode="running"] .study-header { padding: calc(28px + env(safe-area-inset-top, 0px)) max(36px, env(safe-area-inset-right, 0px)) 0 max(36px, env(safe-area-inset-left, 0px)); }
  .planner-study[data-mode="running"] .study-running-goal { top: calc(50% - 174px); font-size: 15px; }
  .planner-study[data-mode="running"] .study-clock > div { gap: 12px; }
  .planner-study[data-mode="running"] .study-clock span { font-size: 13px; }
  .planner-study[data-mode="running"] .study-clock small { font-size: 11px; }
}
@media (max-height: 500px) {
  .planner-study[data-mode="running"] .study-header > span:not(.study-quiet) { display: none; }
  .planner-study[data-mode="running"] .study-header .study-quiet { grid-column: 3; }
  .planner-study[data-mode="running"] .study-clock { top: 50%; }
  .planner-study[data-mode="running"] .study-clock > div { gap: 0; }
  .planner-study[data-mode="running"] .study-clock span { position: absolute; bottom: calc(100% + 10px); }
  .planner-study[data-mode="running"] .study-clock small { display: none; }
  .planner-study[data-mode="running"] .study-clock output { font-size: 72px; }
  .planner-study[data-mode="running"] .study-running-goal { top: calc(35px + env(safe-area-inset-top, 0px)); max-width: min(500px, calc(100% - 220px)); font-size: 11px; }
  .planner-study[data-mode="running"] .study-running-actions { bottom: calc(65px + env(safe-area-inset-bottom, 0px)); }
  .planner-study[data-mode="running"] .study-running-actions button { min-height: 36px; padding-block: 7px; }
  .study-environment { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
}
