/* My daily routine (phone first, wider layout from 960px) */
.rm-wrap { max-width: 1080px; }
.rm-step { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 1.2rem; }
.rm-step b { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--gold); display: grid; place-items: center; font-size: .95rem; }

.rm-types { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rm-type { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-height: 124px; padding: 16px 14px; border-radius: var(--radius); border: 2px solid var(--line); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.rm-type .e { font-size: 2.1rem; line-height: 1.1; }
.rm-type strong { font-size: 1.08rem; line-height: 1.3; }
.rm-type small { color: var(--muted); line-height: 1.4; font-size: .86rem; }
.rm-type:hover { border-color: var(--brand); }
.rm-type[aria-pressed="true"] { border-color: var(--brand-600); background: var(--brand-50); box-shadow: 0 0 0 4px var(--brand-100); }

.rm-times { margin-top: 26px; }
.rm-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rm-tile { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; min-height: 84px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); cursor: pointer; }
.rm-tile:focus-within { border-color: var(--brand-600); box-shadow: 0 0 0 3px var(--brand-100); }
.rm-tcap { color: var(--muted); font-size: .86rem; }
.rm-tval { font-size: 1.35rem; font-weight: 800; color: var(--text); line-height: 1.3; }
.rm-tile input[type="time"], .rm-time input[type="time"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; font-size: 16px; }
.rm-hint { margin: 12px 2px 0; color: var(--text-2); font-size: .93rem; min-height: 1.6em; }
.rm-nm { display: block; margin-top: 16px; }
.rm-nm span, .rm-name span { display: block; color: var(--muted); font-size: .86rem; margin-bottom: 4px; }
.rm-nm input, .rm-name input { width: 100%; min-height: 48px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; }
.rm-nm input:focus, .rm-name input:focus, .rm-x:focus { outline: 3px solid var(--brand-100); border-color: var(--brand-600); }
.rm-go { width: 100%; margin-top: 18px; min-height: 54px; font-size: 1.08rem; }
.rm-saved { margin: 18px 2px 0; color: var(--text-2); font-size: .93rem; }
.rm-link { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--brand-600); text-decoration: underline; cursor: pointer; min-height: 40px; }

/* result */
.rm-res { display: grid; gap: 18px; }
.rm-res[hidden], .rm-setup[hidden], .rm-times[hidden] { display: none; }
.rm-head { display: flex; gap: 10px; align-items: flex-end; }
.rm-name { flex: 1; min-width: 0; }
.rm-head .btn { flex: none; min-height: 48px; }
.rm-sum { margin: 12px 2px 2px; font-weight: 700; color: var(--text-2); }
.rm-tip { margin: 0 2px 12px; color: var(--muted); font-size: .9rem; }
.rm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rm-empty { padding: 20px; border: 1px dashed var(--line); border-radius: var(--radius-sm); color: var(--muted); text-align: center; }
.rm-row { position: relative; display: grid; grid-template-columns: 1fr 44px 40px; grid-template-areas: "t e d" "x x x"; gap: 6px 8px; align-items: center; padding: 10px 10px 10px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.rm-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--k, var(--brand)); }
.rm-row.rm-flash { animation: rm-flash 1.1s var(--ease); }
@keyframes rm-flash { 0% { background: var(--brand-100); } 100% { background: var(--surface); } }
.rm-tc { grid-area: t; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.rm-time { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 12px; background: var(--brand-50); color: var(--brand-700); font-weight: 800; font-size: 1rem; cursor: pointer; white-space: nowrap; }
.rm-time:focus-within { box-shadow: 0 0 0 3px var(--brand-100); }
.rm-dur { color: var(--muted); font-size: .8rem; line-height: 1.2; }
.rm-emo { grid-area: e; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.rm-del { grid-area: d; width: 40px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.rm-del:hover { color: var(--danger); background: var(--surface-2); }
.rm-x { grid-area: x; width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 12px; border: 1px solid transparent; background: var(--surface-2); color: var(--text); font: inherit; font-size: 1rem; line-height: 1.5; resize: none; overflow: hidden; display: block; }
.rm-emos { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 4px; padding-top: 4px; }
.rm-pick { height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 1.35rem; cursor: pointer; }
.rm-pick:hover { border-color: var(--brand); background: var(--brand-50); }

.rm-add { margin-top: 18px; }
.rm-add h3 { font-size: 1.02rem; margin: 0 0 8px; }
.rm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rm-chips .fx-chip { min-height: 44px; }

.rm-dl h3 { margin: 0 0 12px; font-size: 1.12rem; }
.rm-themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.rm-th { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; align-content: start; padding: 0 0 8px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; overflow: hidden; }
.rm-th i { display: block; height: 22px; }
.rm-th span { grid-column: 1 / -1; padding-top: 6px; }
.rm-th[aria-pressed="true"] { border-color: var(--brand-600); box-shadow: 0 0 0 3px var(--brand-100); }
.rm-dlb { display: grid; gap: 8px; }
.rm-dlb .btn { width: 100%; min-height: 50px; }
.rm-dlb [hidden] { display: none; }
.is-busy { opacity: .6; pointer-events: none; }
.rm-msg { min-height: 1.4em; margin: 10px 0 0; color: var(--text-2); font-size: .92rem; }
.rm-prev { margin-top: 10px; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; background: var(--surface-2); }
.rm-prev[hidden] { display: none; }
.rm-prev img { width: 100%; height: auto; display: block; }
.rm-fine { margin: 10px 0 0; color: var(--muted); font-size: .82rem; }

@media (min-width: 720px) and (max-width: 959px) {
  .rm-types { grid-template-columns: repeat(4, 1fr); }
  .rm-tiles { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 960px) {
  .rm-types { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .rm-type { min-height: 150px; padding: 20px 18px; }
  .rm-tiles { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .rm-go { width: auto; min-width: 280px; }
  .rm-times { max-width: 900px; }
  .rm-res { grid-template-columns: minmax(0, 1fr) 400px; gap: 28px; align-items: start; }
  .rm-dl { position: sticky; top: calc(var(--header-h) + 16px); }
  .rm-row { grid-template-columns: 124px 44px 1fr 40px; grid-template-areas: "t e x d"; align-items: start; }
  .rm-tc { flex-direction: column; align-items: flex-start; gap: 2px; }
  .rm-emo, .rm-del { margin-top: 1px; }
}
@media (prefers-reduced-motion: reduce) { .rm-row.rm-flash { animation: none; } }
