@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@500;600;700&family=Nunito:wght@400;600;700&display=swap');

:root {
  --ink: #332a27;
  --blue-ink: #294f7b;
  --paper: #fffdf5;
  --paper-shadow: #d6c9b9;
  --line: rgba(137, 176, 204, .27);
  --margin-line: rgba(201, 113, 98, .24);
  --accent: #b96855;
  --leather-dark: #1d1714;
  --leather-light: #41312a;
  --shadow: rgba(37, 25, 19, .34);
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font: 16px/1.5 Nunito, system-ui, sans-serif;
  background: #c8b8a6;
  background-image: radial-gradient(rgba(93, 68, 51, .23) .7px, transparent .7px), linear-gradient(135deg, #d8cbbb, #b9a693);
  background-size: 7px 7px, auto;
}

.site-header {
  position: relative;
  z-index: 4;
  display: flex;
  max-width: 1320px;
  align-items: center;
  justify-content: space-between;
  margin: auto;
  padding: 1.2rem 2rem;
}

.brand {
  color: #fff9ed;
  font-family: Caveat, cursive;
  font-size: 2.15rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
  text-shadow: 0 2px 3px rgba(43, 28, 21, .45);
}

.user-menu { display: flex; gap: .8rem; align-items: center; color: #fff9ed; font-size: .9rem; }
.user-menu form { margin: 0; }
.link-button { border: 0; color: #ffe0bf; background: none; cursor: pointer; font: inherit; }

main { position: relative; z-index: 1; max-width: 1320px; margin: 0 auto; padding: .7rem 2rem 3rem; }

.ringbook {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-height: 680px;
  padding: 22px 44px 24px;
  overflow: visible;
  border: 2px solid #14110f;
  border-radius: 32px;
  background-color: var(--leather-dark);
  background-image: radial-gradient(rgba(255,255,255,.09) .65px, transparent .75px), linear-gradient(115deg, #191311, #45342b 48%, #1b1512);
  background-size: 5px 5px, auto;
  box-shadow: inset 0 0 0 5px #2b201b, inset 0 0 0 7px rgba(217, 184, 138, .32), 0 18px 28px var(--shadow);
}

.ringbook::before {
  position: absolute;
  inset: 11px;
  z-index: 0;
  content: '';
  pointer-events: none;
  border: 1px dashed rgba(236, 198, 151, .47);
  border-radius: 23px;
}

.paper {
  position: relative;
  z-index: 1;
  min-height: 632px;
  padding: 2.8rem 3.4rem;
  overflow: hidden;
  border: 1px solid #eadfce;
  background-color: var(--paper);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 38px, var(--line) 39px, transparent 40px), radial-gradient(rgba(91, 71, 52, .04) .7px, transparent .8px);
  background-size: auto, 6px 6px;
  box-shadow: 0 5px 8px rgba(17, 13, 11, .38), inset 0 0 20px rgba(173, 143, 107, .10);
}

.paper::before {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  content: '';
  background: var(--margin-line);
}

.input-page, .timeline-page { border-radius: 23px 4px 4px 23px; box-shadow: inset -18px 0 20px -21px #46362d, 0 5px 8px rgba(17, 13, 11, .38), inset 0 0 20px rgba(173, 143, 107, .10); }
.input-page::before, .timeline-page::before { right: 42px; }
.calendar-page, .summary-page { border-radius: 4px 23px 23px 4px; box-shadow: inset 18px 0 20px -21px #46362d, 0 5px 8px rgba(17, 13, 11, .38), inset 0 0 20px rgba(173, 143, 107, .10); }
.calendar-page::before, .summary-page::before { left: 42px; }
.paper > * { position: relative; z-index: 1; }

.ring-spine {
  position: absolute;
  z-index: 3;
  top: 35px;
  bottom: 35px;
  left: 50%;
  display: flex;
  width: 72px;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  transform: translateX(-50%);
  pointer-events: none;
}

.ring-spine::before {
  position: absolute;
  z-index: -1;
  top: -20px;
  bottom: -20px;
  left: 50%;
  width: 10px;
  content: '';
  transform: translateX(-50%);
  border-radius: 99px;
  background: linear-gradient(90deg, #343a3c, #fbfcf7 34%, #a7acac 61%, #43494a);
  box-shadow: 1px 1px 5px rgba(0, 0, 0, .65);
}

.ring-spine span {
  display: block;
  width: 58px;
  height: 29px;
  border: 5px solid #5d6261;
  border-top-color: #f8f8f1;
  border-right-color: #c4c8c5;
  border-bottom-color: #383d3d;
  border-radius: 50%;
  background: linear-gradient(90deg, rgba(44, 48, 48, .7), rgba(250, 250, 246, .85) 42%, rgba(84, 89, 88, .62));
  box-shadow: 0 3px 4px rgba(0, 0, 0, .55), inset 0 1px 1px rgba(255,255,255,.75);
}

.book-tabs { position: absolute; z-index: 2; top: 135px; right: -27px; display: grid; gap: 62px; }
.book-tabs a { display: grid; width: 43px; height: 98px; place-items: center; border: 1px solid rgba(28, 21, 17, .55); border-radius: 0 14px 14px 0; color: rgba(255,255,255,.93); box-shadow: 3px 4px 6px rgba(0,0,0,.28), inset 2px 0 5px rgba(255,255,255,.25); font-size: 1.45rem; text-decoration: none; transition: transform .15s ease, filter .15s ease; }.book-tabs a:hover, .book-tabs a:focus-visible { transform: translateX(3px); filter: brightness(1.12); }
.tab-blue { background: #5599c7; }.tab-ochre { background: #d8a442; }.tab-green { background: #8eaf58; }

h1, h2, p { margin-top: 0; }
.eyebrow { color: #a55d4b; font-size: .82rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.paper h1, .calendar-title h1, .day-heading h1 { color: #2d2623; font-family: Caveat, cursive; font-size: clamp(3rem, 5vw, 4.9rem); font-weight: 700; line-height: .98; }

label { display: block; margin-top: 1rem; font-weight: 700; }
textarea, input:not([type=color]) { width: 100%; margin-top: .3rem; padding: .8rem; border: 1px solid #cdbfad; border-radius: 8px; outline-color: var(--accent); background: rgba(255,255,255,.68); box-shadow: inset 0 1px 4px rgba(90, 65, 44, .08); font: inherit; }
textarea { min-height: 280px; resize: vertical; }
button { margin-top: 1rem; padding: .72rem 1.1rem; border: 0; border-radius: 8px; color: #fffaf1; background: #b96750; box-shadow: 0 3px 0 #8f493a; cursor: pointer; font: 700 1rem Nunito, sans-serif; }
button:hover { background: #96503e; }
.preview { margin-top: 2rem; padding: 1.15rem; border: 1px dashed #b98773; border-radius: 8px; background: rgba(255,248,239,.88); }
.preview h2 { color: var(--blue-ink); font-family: Caveat, cursive; font-size: 2.15rem; }.preview p { font-size: .9rem; }.preview textarea { min-height: 4rem; }

.calendar-title { padding-top: .25rem; text-align: center; }.month-switcher { display: grid; grid-template-columns: 3rem minmax(0, 1fr) 3rem; align-items: center; }.month-switcher > a { display: grid; width: 2.4rem; height: 2.4rem; place-items: center; border: 2px solid var(--blue-ink); border-radius: 50%; color: var(--blue-ink); background: rgba(255,253,245,.8); box-shadow: 0 2px 0 #183957; font-size: 2rem; line-height: 1; text-decoration: none; transition: transform .15s ease, background .15s ease; }.month-switcher > a:hover { transform: translateY(-2px); color: #fff; background: var(--blue-ink); }.calendar-title h1 { margin-bottom: .1rem; color: var(--blue-ink); }.calendar-title p { color: #796e68; font-size: 1.1rem; font-weight: 700; }
.view-switch { display: flex; justify-content: center; gap: .5rem; margin: 1.8rem 0; }.view-switch a { padding: .35rem .75rem; border-bottom: 2px solid transparent; color: var(--ink); text-decoration: none; }.view-switch a:hover, .view-switch .active { border-bottom-color: var(--accent); color: var(--blue-ink); }
.weekdays, .month-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }.weekdays { color: #857a73; font-size: .8rem; font-weight: 700; }.weekdays span { padding-bottom: .45rem; }.day { display: grid; min-height: 64px; place-items: center; color: var(--ink); text-decoration: none; }.day span { display: grid; width: 37px; height: 37px; place-items: center; border: 2px solid transparent; border-radius: 50%; }.day:hover span, .day.today span { border-color: var(--accent); color: var(--accent); }.day.today span { box-shadow: 0 0 0 3px rgba(185, 104, 85, .16); }.day.has-appointment span { color: #fffdf5; background: var(--accent); box-shadow: 0 2px 0 #8f4434; }.day.has-appointment.today span { box-shadow: 0 0 0 3px rgba(185, 104, 85, .24), 0 2px 0 #8f4434; }.day.outside { color: #b9afa8; }.range-days { display: grid; gap: 1rem; }.range-days a { display: grid; grid-template-columns: 4rem 3rem 1fr; gap: .8rem; align-items: center; padding: 1rem; border: 1px solid #eadfd4; border-radius: 8px; color: var(--ink); background: rgba(255,255,255,.33); text-decoration: none; }.range-days a.today { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(185, 104, 85, .14); }.range-days span { display: grid; width: 2.5rem; height: 2.5rem; place-items: center; border: 2px solid var(--accent); border-radius: 50%; color: var(--accent); }.range-days a.has-appointment span { color: #fffdf5; background: var(--accent); box-shadow: 0 2px 0 #8f4434; }.range-days i { color: var(--accent); font-size: .8rem; font-style: normal; }

.back a { color: #fff9ed; text-shadow: 0 1px 2px rgba(0,0,0,.4); }.day-heading { text-align: center; }.day-heading p { margin-bottom: 0; color: var(--blue-ink); font-family: Caveat, cursive; font-size: 2rem; font-weight: 600; }.day-heading h1 { margin-bottom: 2rem; }.day-heading span { display: inline-block; margin-top: -1.4rem; margin-bottom: 1.2rem; padding: .15rem .6rem; border: 1px solid var(--accent); border-radius: 99px; color: var(--accent); font-size: .75rem; font-weight: 700; text-transform: uppercase; }.today-heading h1 { color: var(--accent); }.timeline-page h2, .summary-page h2 { color: var(--blue-ink); font-family: Caveat, cursive; font-size: 2.25rem; }.schedule { display: grid; gap: .9rem; }.appointment { display: grid; grid-template-columns: 7rem 1fr; gap: .25rem 1rem; padding: .75rem; border: 1px solid color-mix(in srgb, var(--appointment-color) 62%, #6a5f55); border-left: 8px solid var(--appointment-color); border-radius: 7px; background: color-mix(in srgb, var(--appointment-color) 14%, #fffdf5); box-shadow: 0 2px 3px rgba(82, 65, 48, .16); }.appointment time { grid-row: span 2; font-weight: 700; }.appointment small { grid-column: 2; color: #6a5d55; }.summary-page h2:not(:first-child) { margin-top: 3rem; }.summary-list, .free-slots { margin: 0; padding: 0; list-style: none; }.summary-list li, .free-slots li { display: flex; gap: .6rem; align-items: center; padding: .65rem 0; border-bottom: 1px dashed #c4b8ad; }.summary-list i { display: inline-block; flex: 0 0 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 1px 1px rgba(255,255,255,.5); }.free-slots li { justify-content: space-between; }.free-slots a { color: var(--blue-ink); font-family: Caveat, cursive; font-size: 1.25rem; font-weight: 700; text-decoration: none; }.empty { color: #756a63; }.message { padding: .8rem 1rem; border-radius: 8px; background: #e1f0e1; }.error { color: #a22b2b; }.login-card { max-width: 480px; min-height: 0; margin: 4rem auto; border-radius: 18px; box-shadow: 0 8px 22px var(--shadow); }
.appointment { color: var(--ink); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }.appointment:hover { transform: translateX(3px); box-shadow: 0 4px 7px rgba(82, 65, 48, .26); }.summary-list a { color: var(--ink); text-decoration: none; }.summary-list a:hover { color: var(--blue-ink); text-decoration: underline; }.appointment-book .paper { min-height: 590px; }.appointment-actions hr { margin: 2rem 0; border: 0; border-top: 1px solid #c6b7a7; }.appointment-actions > a { color: var(--blue-ink); font-family: Caveat, cursive; font-size: 1.35rem; font-weight: 700; }.color-swatch::before { display: inline-block; width: 14px; height: 14px; margin-right: .5rem; content: ''; border-radius: 50%; background: var(--appointment-color); box-shadow: inset 0 1px 1px rgba(255,255,255,.6); }.danger-link { color: #9d3932 !important; }.danger-button { background: #a34037; box-shadow: 0 3px 0 #722c27; }
.day.today span { border-color: #fff9ed; color: #fff; background: var(--blue-ink); box-shadow: 0 0 0 3px var(--accent), 0 4px 0 #183957; font-weight: 700; }.day.has-appointment.today span { color: #fff; background: var(--blue-ink); box-shadow: 0 0 0 3px var(--accent), 0 4px 0 #183957; }.range-days a.today { border: 2px solid var(--blue-ink); background: rgba(63, 113, 160, .14); box-shadow: 0 0 0 4px rgba(185, 104, 85, .35); }.range-days a.today span { background: var(--blue-ink); box-shadow: 0 2px 0 #183957; }.today-heading { margin: -.5rem -1rem 1.8rem; padding: .8rem 1rem .1rem; border: 2px solid var(--accent); border-radius: 12px; background: rgba(63, 113, 160, .10); box-shadow: 0 3px 0 rgba(185, 104, 85, .42); }

@media (max-width: 850px) { .paper { padding: 2.2rem 2.4rem; }.book-tabs { display: none; } }
@media (max-width: 760px) { .site-header, main { padding-right: 1rem; padding-left: 1rem; }.ringbook, .day-book { grid-template-columns: 1fr; gap: 0; padding: 13px; }.ring-spine, .book-tabs { display: none; }.paper { min-height: auto; padding: 1.7rem; }.input-page, .timeline-page { border-radius: 17px 17px 2px 2px; }.calendar-page, .summary-page { border-radius: 2px 2px 17px 17px; }.input-page::before, .timeline-page::before { right: 28px; }.calendar-page::before, .summary-page::before { left: 28px; }.month-grid .day { min-height: 50px; }.appointment { grid-template-columns: 1fr; }.appointment time, .appointment small { grid-column: auto; grid-row: auto; } }

/* Detailed cards for the 3-day and week views. */
.range-day { display: grid; grid-template-columns: 7.8rem minmax(0, 1fr) 3.2rem; gap: .8rem; align-items: center; min-height: 76px; padding: .8rem 1rem; border: 1px solid #eadfd4; border-radius: 8px; background: rgba(255,255,255,.33); }
.range-day.today { border: 2px solid var(--blue-ink); background: rgba(63, 113, 160, .14); box-shadow: 0 0 0 4px rgba(185, 104, 85, .35); }
.range-day-date { display: grid !important; grid-template-columns: 4rem 3rem !important; gap: .35rem !important; align-items: center; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; color: var(--ink) !important; text-decoration: none; }
.range-day-date span { display: grid !important; width: 2.5rem !important; height: 2.5rem !important; place-items: center; padding: 0 !important; border: 2px solid var(--accent) !important; border-radius: 50% !important; color: var(--accent) !important; background: transparent !important; box-shadow: none !important; }
.range-day.has-appointment .range-day-date span { color: #fffdf5 !important; background: var(--accent) !important; box-shadow: 0 2px 0 #8f4434 !important; }
.range-day.today .range-day-date span { color: #fff !important; background: var(--blue-ink) !important; box-shadow: 0 2px 0 #183957 !important; }
.range-appointments { min-width: 0; }.range-appointments p { margin: .18rem 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }.range-appointments time { color: var(--blue-ink); font-weight: 700; }.range-appointments .no-appointments { color: #8a7e75; font-style: italic; }
.range-day .utilization { display: grid !important; width: 2.55rem !important; height: 2.55rem !important; place-items: center; padding: 0 !important; border: 0 !important; border-radius: 50% !important; color: inherit !important; background: conic-gradient(var(--blue-ink) calc(var(--fill) * 1%), #e7dfd4 0) !important; box-shadow: inset 0 0 0 1px rgba(50, 40, 33, .2) !important; }
.range-day .utilization span { display: grid !important; width: 1.82rem !important; height: 1.82rem !important; place-items: center; padding: 0 !important; border: 0 !important; border-radius: 50% !important; color: var(--blue-ink) !important; background: var(--paper) !important; box-shadow: none !important; font-size: .62rem; font-weight: 700; }
@media (max-width: 760px) { .range-day { grid-template-columns: 6.2rem minmax(0, 1fr) 2.55rem; gap: .4rem; padding: .65rem; }.range-day-date { grid-template-columns: 3.2rem 2.5rem !important; } }
