.mres {
  --res-ink: #18392e;
  --res-muted: #456259;
  --res-green: #17604a;
  --res-line: #d7e9df;
  background: linear-gradient(155deg, #e8f6ef 0, #f7fbf8 48%);
  color: var(--res-ink);
  min-height: 100vh;
  font: 1rem/1.55 "Segoe UI", system-ui, sans-serif;
}
.mres-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem max(1rem, calc((100% - 1260px) / 2));
  background: white;
  border-bottom: 1px solid var(--res-line);
}
.mres-head a { color: var(--res-green); font-size: .94rem; }
.mres-brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; font-weight: 750; }
.mres-brand img { object-fit: contain; }
.mres-shell { width: min(1260px, calc(100% - 2rem)); margin: auto; padding: clamp(1.5rem, 4vw, 3.75rem) 0; }
.mres-intro { margin-bottom: 1.5rem; }
.mres-intro h1 { font-size: clamp(2rem, 4vw, 3.35rem); }
.mres p { margin: .6rem 0; color: var(--res-muted); }
.mres h2 { font-size: 1.25rem; letter-spacing: -.02em; }
.mres .mres-demo { display: table; border-left: 3px solid #5b947d; padding: .25rem .65rem; background: #e1f2e7; font-size: .9rem; }
.mres-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(235px, 270px); gap: 1rem; align-items: start; }
.mres-calendar, .mres-detail, .mres-form-card { background: #fff; border: 1px solid var(--res-line); border-radius: 16px; }
.mres-calendar { overflow: hidden; }
.mres-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: .9rem; }
.mres-toolbar nav { display: flex; gap: .35rem; }
.mres-toolbar a { min-width: 40px; min-height: 40px; display: grid; place-items: center; padding: 0 .45rem; border: 1px solid var(--res-line); border-radius: 7px; text-decoration: none; }
.mres-toolbar a:hover, .mres-cell:hover { background: #eff8f3; }
.mres-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mres-weekday { text-align: center; padding: .5rem 0; background: #e8f4ed; font-size: .83rem; font-weight: 700; }
.mres-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .4rem;
  min-height: clamp(64px, 7vw, 98px);
  padding: .5rem;
  border-top: 1px solid var(--res-line);
  border-right: 1px solid var(--res-line);
  font-weight: 650;
  text-decoration: none;
}
.mres-cell:nth-child(7n) { border-right: 0; }
.mres-outside { color: #789087; background: #f4f8f5; }
.mres-cell[aria-current=true] { background: #e1f2e7; box-shadow: inset 0 0 0 2px #32795f; }
.mres-today { color: white; background: var(--res-green); padding-inline: .3rem; border-radius: 5px; }
.mres-status { font-size: .8rem; line-height: 1.15; font-weight: 650; color: #49665a; }
.mres-open .mres-status { color: var(--res-green); background: #e5f5ea; padding: .2rem .35rem; border-radius: 5px; }
.mres-full .mres-status { color: #804127; }
.mres-detail, .mres-form-card { padding: 1.25rem; }
.mres-detail { scroll-margin-top: 3rem; }
.mres-detail p { margin-block: .7rem 1.05rem; }
.mres-form-card { max-width: 660px; }
.mres-form-card h2 { margin-block: .8rem 1rem; }
.mres-form-card label { display: grid; gap: .3rem; font-weight: 650; margin-bottom: .9rem; min-width: 0; }
.mres-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.mres-form-card :is(input, textarea, select) {
  font: inherit; font-weight: 400; color: var(--res-ink); width: 100%; min-height: 44px;
  background: white; border: 1px solid #a9cbbb; padding: .5rem .7rem; border-radius: 8px;
}
.mres-button { display: inline-flex; align-items: center; min-height: 44px; padding: .6rem 1rem; border: 0; border-radius: 8px; background: var(--res-green); color: #fff; cursor: pointer; font: inherit; font-weight: 700; text-decoration: none; }
.mres-button:hover { background: #104937; color: #fff; }
.mres-button:disabled { opacity: .65; cursor: wait; }
.mres-preview { white-space: pre-wrap; overflow-wrap: anywhere; padding: .8rem; border-radius: 8px; background: #edf7f0; }
@media (max-width: 820px) { .mres-layout { grid-template-columns: 1fr; } }
@media (max-width: 460px) {
  .mres-cell { padding: .32rem .18rem; font-size: .84rem; }
  .mres-status { font-size: .69rem; }
  .mres-open .mres-status { padding-inline: .16rem; }
  .mres-fields { grid-template-columns: 1fr; gap: 0; }
}
