.ts-shell {
  width: 80vw;
  max-width: 80vw;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 56px) 0 80px;
  font-family: Manrope, system-ui, sans-serif;
  color: #152033;
  box-sizing: border-box;
}

.ts-card {
  background: rgba(244, 247, 250, 0.72);
  border-radius: 20px;
  padding: clamp(28px, 4vw, 40px);
  border: 1px solid rgba(247, 244, 239, 0.35);
}

.ts-auth {
  max-width: 520px;
  margin: 8vh auto 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 36px rgba(21, 32, 51, 0.1);
}

.ts-auth .ts-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.ts-auth .ts-btn {
  border-radius: 999px;
  min-width: 140px;
}

.ts-kicker {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5A6B7D;
}

.ts-title {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #F7F4EF;
}

.ts-card .ts-title,
.ts-diary-top .ts-title {
  color: #152033;
}

.ts-lead {
  margin: 0 0 28px;
  font-size: 1.05rem;
  line-height: 1.55;
  color: #5A6B7D;
  max-width: 42ch;
}

.ts-auth .ts-lead {
  max-width: 36rem;
}

.ts-meta,
.ts-hint,
.ts-muted {
  color: #5A6B7D;
  font-size: 0.95rem;
  line-height: 1.45;
}

.ts-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ts-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 8px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.ts-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ts-btn-primary {
  background: #2F6FED;
  color: #F7F4EF;
}

.ts-btn-primary:hover:not(:disabled) {
  background: #2458c4;
  color: #F7F4EF;
}

.ts-btn-ghost {
  background: transparent;
  border-color: rgba(21, 32, 51, 0.18);
  color: #152033;
}

.ts-diary-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.ts-shell.ts-diary {
  width: 80vw;
  max-width: 80vw;
}

.ts-diary-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  min-height: calc(100vh - 64px);
}

.ts-calendar-panel {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding: 18px 14px;
  background: rgba(232, 238, 244, 0.72);
  border: 1px solid rgba(21, 32, 51, 0.08);
  border-radius: 18px;
  position: sticky;
  top: 16px;
  align-self: start;
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.ts-diary-main {
  min-width: 0;
  padding: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ts-diary .ts-editor-panel {
  border-radius: 18px;
  background: rgba(244, 247, 250, 0.72);
  border: 1px solid rgba(21, 32, 51, 0.08);
}

.ts-nav-label {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5A6B7D;
}

.ts-diary .ts-diary-top {
  margin: 0;
  padding: 0;
}

.ts-diary .ts-editor-panel {
  flex: 1;
  margin: 0;
  min-width: 0;
}

.ts-editor-panel {
  min-width: 0;
}

@media (max-width: 860px) {
  .ts-diary-layout {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 16px;
  }

  .ts-calendar-panel {
    position: static;
    max-height: none;
  }

  .ts-diary-main {
    padding: 0;
  }
}

.ts-view-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 14px;
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(232, 238, 244, 0.95);
  padding-bottom: 4px;
}

.ts-view-btn {
  min-height: 32px;
  border: 1px solid rgba(21, 32, 51, 0.14);
  border-radius: 8px;
  background: #fff;
  color: #152033;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0 4px;
}

.ts-view-btn.is-active {
  background: #2F6FED;
  border-color: #2F6FED;
  color: #F7F4EF;
}

.ts-cal-grid.ts-cal-lifetime,
.ts-cal-grid.ts-cal-year {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.ts-cal-grid.ts-cal-month {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.ts-cal-chip {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: #152033;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
}

.ts-cal-chip:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ts-cal-chip.is-selected,
.ts-cal-slot.is-selected {
  background: #2F6FED;
  color: #F7F4EF;
}

.ts-cal-chip.is-marked::after,
.ts-cal-slot.is-marked::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2F6FED;
  transform: translateX(-50%);
}

.ts-cal-chip.is-selected.is-marked::after,
.ts-cal-slot.is-selected.is-marked::after {
  background: #F7F4EF;
}

.ts-cal-grid.ts-cal-dayview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 6px;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.ts-cal-slot {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: #152033;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
}

.ts-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 10px;
}

.ts-cal-label {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

.ts-icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(21, 32, 51, 0.15);
  border-radius: 8px;
  background: #fff;
  color: #152033;
  font-size: 1.25rem;
  cursor: pointer;
}

.ts-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.ts-cal-dow {
  text-align: center;
  font-size: 0.62rem;
  font-weight: 600;
  color: #5A6B7D;
  padding-bottom: 2px;
}

.ts-calendar-panel .ts-icon-btn {
  width: 32px;
  height: 32px;
  font-size: 1.1rem;
  flex: 0 0 auto;
}

.ts-calendar-panel .ts-hint {
  font-size: 0.72rem;
  margin-top: 12px;
}

.ts-cal-dayview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  max-height: min(60vh, 520px);
  overflow: auto;
}

.ts-cal-day {
  aspect-ratio: 1;
  min-height: 0;
  min-width: 0;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: #152033;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  padding: 0;
}

.ts-cal-day.is-outside {
  visibility: hidden;
}

.ts-cal-day:disabled {
  color: #A0AAB5;
  background: transparent;
  cursor: not-allowed;
  font-weight: 400;
}

.ts-cal-day.is-marked:not(:disabled)::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2F6FED;
  transform: translateX(-50%);
}

.ts-cal-day.is-selected {
  background: #2F6FED;
  color: #F7F4EF;
}

.ts-cal-day.is-selected.is-marked::after {
  background: #F7F4EF;
}

.ts-editor-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.ts-day-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
}

.ts-save-state {
  font-size: 0.9rem;
  color: #5A6B7D;
}

.ts-editor {
  width: 100%;
  min-height: 180px;
  border: 1px solid rgba(21, 32, 51, 0.08);
  border-radius: 16px;
  padding: 20px 22px;
  font: inherit;
  font-size: 1.08rem;
  line-height: 1.7;
  color: #152033;
  background: rgba(255, 255, 255, 0.88);
  resize: vertical;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.ts-day-entries {
  margin: 0;
}

.ts-day-entries-head {
  margin-bottom: 14px;
}

.ts-day-entries-title {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #152033;
}

.ts-day-entries-meta {
  margin: 0;
  font-size: 0.9rem;
  color: #5A6B7D;
}

.ts-day-entries-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ts-day-entry {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(21, 32, 51, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  padding: 14px 16px;
  color: #152033;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.ts-day-entry:hover,
.ts-day-entry.is-active {
  border-color: #A8C4F0;
  box-shadow: 0 0 0 3px rgba(168, 196, 240, 0.25);
}

.ts-day-entry-time {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5A6B7D;
}

.ts-day-entry-body {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.98rem;
  line-height: 1.55;
  color: #152033;
}

.ts-day-entries-empty {
  margin: 0;
  padding: 18px 4px;
  color: #5A6B7D;
  font-size: 0.95rem;
}

.ts-editor:focus {
  outline: none;
  border-color: #A8C4F0;
  box-shadow: 0 0 0 4px rgba(168, 196, 240, 0.28);
  background: #fff;
}

.ts-editor-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.ts-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 500;
  color: #5A6B7D;
  letter-spacing: 0.01em;
}

.ts-input {
  display: block;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  margin-bottom: 20px;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(21, 32, 51, 0.1);
  font: inherit;
  font-size: 1.02rem;
  line-height: 1.4;
  color: #152033;
  background: rgba(255, 255, 255, 0.82);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.ts-input:hover {
  border-color: rgba(21, 32, 51, 0.18);
  background: #fff;
}

.ts-input:focus {
  outline: none;
  border-color: #A8C4F0;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(168, 196, 240, 0.35);
}

.ts-birth-form {
  margin-top: 12px;
}

.ts-name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 560px) {
  .ts-name-row {
    grid-template-columns: 1fr;
  }
}

.ts-field {
  min-width: 0;
}

.ts-field .ts-input {
  width: 100%;
  margin-bottom: 0;
}

.ts-select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #5A6B7D 50%), linear-gradient(135deg, #5A6B7D 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% - 3px), calc(100% - 14px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
  margin-bottom: 20px;
  cursor: pointer;
}

.ts-onboarding {
  max-width: 520px;
  padding: clamp(28px, 4vw, 40px);
  border-radius: 20px;
}

.ts-onboarding .ts-lead {
  margin-bottom: 28px;
  line-height: 1.55;
}

.ts-onboarding .ts-btn {
  width: auto;
  min-width: 160px;
  margin-top: 8px;
  border-radius: 999px;
  padding: 0 28px;
}

body.home .ts-onboarding,
body.page-slug-welcome .ts-onboarding,
body.page-slug-onboarding .ts-onboarding {
  background: rgba(244, 247, 250, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 28px rgba(21, 32, 51, 0.12);
  border: 1px solid rgba(247, 244, 239, 0.35);
}

body.page-slug-onboarding {
  background-color: #1a2744;
  background-image:
    linear-gradient(180deg, rgba(21, 32, 51, 0.35) 0%, rgba(21, 32, 51, 0.45) 100%),
    url('/wp-content/uploads/2026/08/touchstones-celebratory-street-modern.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.login #ts_birthdate,
.login .ts-diary-register-note {
  font-family: Manrope, system-ui, sans-serif;
}

.login .ts-diary-register-note {
  color: #5A6B7D;
  margin: 0 0 16px;
}

/* Soften theme chrome on diary pages */
body.page-slug-diary .wp-site-blocks > main,
body.page-slug-welcome .wp-site-blocks > main,
body.home .wp-site-blocks > main {
  margin-top: 0 !important;
}

body.page-slug-diary .wp-block-post-title,
body.page-slug-welcome .wp-block-post-title,
body.page-slug-onboarding .wp-block-post-title,
body.home .wp-block-post-title {
  display: none;
}

.ts-onboarding .ts-input,
.ts-onboarding .ts-select {
  width: 100%;
  max-width: none;
}

.ts-credit {
  margin: 0;
  text-align: center;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 0.9rem;
  color: #5A6B7D;
}


.ts-error {
  color: #B42318;
  margin: 0 0 16px;
  font-size: 0.95rem;
}

/* Sticky page shell */
html, body {
  height: 100%;
}

body .wp-site-blocks {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body .wp-site-blocks > main.wp-block-group {
  flex: 1 0 auto;
}

body .wp-site-blocks > .wp-block-template-part:last-child {
  margin-top: auto;
}

body.home .ts-auth,
body.page-slug-welcome .ts-auth {
  background: rgba(244, 247, 250, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 28px rgba(21, 32, 51, 0.12);
  border: 1px solid rgba(247, 244, 239, 0.35);
}

@media (max-width: 782px) {
  body.home,
  body.page-slug-welcome {
    background-attachment: scroll;
  }
}

/* WordPress login / register — same card position as main signup */
body.login {
  display: block;
  min-height: 100vh;
  font-family: Manrope, system-ui, sans-serif !important;
  padding: clamp(24px, 5vw, 56px) 16px 80px;
  box-sizing: border-box;
}

body.login #login {
  width: min(520px, 100%);
  max-width: min(520px, 100%);
  margin: 8vh auto 0;
  padding: clamp(28px, 4vw, 40px);
  background: rgba(244, 247, 250, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(247, 244, 239, 0.35);
  border-radius: 20px;
  box-shadow: 0 10px 36px rgba(21, 32, 51, 0.1);
  box-sizing: border-box;
}

body.login h1 {
  margin: 0 0 12px;
}

body.login h1 a {
  background-image: none !important;
  text-indent: 0 !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  font-family: Manrope, system-ui, sans-serif !important;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #152033 !important;
  text-shadow: none;
}

body.login #loginform,
body.login #registerform,
body.login #lostpasswordform {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin-top: 16px;
}

body.login label,
body.login .privacy-policy-page-link a,
body.login #nav a,
body.login #backtoblog a {
  font-family: Manrope, system-ui, sans-serif !important;
  color: #F7F4EF;
  text-shadow: 0 1px 8px rgba(21, 32, 51, 0.4);
}

body.login #loginform label,
body.login #registerform label,
body.login #lostpasswordform label {
  color: #152033;
  text-shadow: none;
  font-weight: 600;
}

body.login #nav,
body.login #backtoblog,
body.login .privacy-policy-page-link {
  width: min(560px, 100%);
  margin-left: auto;
  margin-right: auto;
}

body.login input[type="text"],
body.login input[type="password"],
body.login input[type="email"],
body.login input[type="date"],
body.login select {
  width: 100% !important;
  min-height: 48px !important;
  padding: 12px 16px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(21, 32, 51, 0.1) !important;
  background: rgba(255, 255, 255, 0.88) !important;
  font-family: Manrope, system-ui, sans-serif !important;
  font-size: 1.02rem !important;
  color: #152033;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

body.login input[type="text"]:focus,
body.login input[type="password"]:focus,
body.login input[type="email"]:focus,
body.login input[type="date"]:focus,
body.login select:focus {
  border-color: #A8C4F0 !important;
  box-shadow: 0 0 0 4px rgba(168, 196, 240, 0.35) !important;
  outline: none !important;
}

body.login .button-primary,
body.login .wp-core-ui .button-primary {
  background: #2F6FED !important;
  border-color: #2F6FED !important;
  border-radius: 999px !important;
  font-family: Manrope, system-ui, sans-serif !important;
  font-weight: 600 !important;
  text-shadow: none !important;
  box-shadow: none !important;
  min-height: 44px;
  padding: 0 26px !important;
  float: none !important;
  width: auto !important;
}

body.login .button-primary:hover,
body.login .wp-core-ui .button-primary:hover {
  background: #2458c4 !important;
  border-color: #2458c4 !important;
}

body.login #nav,
body.login #backtoblog {
  text-align: center;
  padding: 0 !important;
}

body.login #nav a:hover,
body.login #backtoblog a:hover,
body.login .privacy-policy-page-link a:hover {
  color: #A8C4F0;
}

body.login .message,
body.login #login_error,
body.login .success {
  border-radius: 8px;
  background: rgba(244, 247, 250, 0.75);
  backdrop-filter: blur(8px);
  border-left-width: 4px;
  box-shadow: 0 4px 16px rgba(21, 32, 51, 0.1);
}

body.login #language-switcher {
  display: none;
}

@media (max-width: 782px) {
  body.login {
    background-attachment: scroll;
  }
}
/* Break Twenty Twenty-Five content-size lock so diary can use full shell width */
body.page-slug-diary .wp-block-post-content.is-layout-constrained > *,
body.page-slug-onboarding .wp-block-post-content.is-layout-constrained > *,
body.page-slug-welcome .wp-block-post-content.is-layout-constrained > *,
body.home .wp-block-post-content.is-layout-constrained > *,
body.page-slug-diary .is-layout-constrained > .ts-shell,
body.page-slug-onboarding .is-layout-constrained > .ts-shell,
body.page-slug-welcome .is-layout-constrained > .ts-shell,
body.home .is-layout-constrained > .ts-shell {
  max-width: none !important;
  width: 80vw !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

body.page-slug-diary main.wp-block-group.is-layout-constrained,
body.page-slug-onboarding main.wp-block-group.is-layout-constrained,
body.page-slug-welcome main.wp-block-group.is-layout-constrained,
body.home main.wp-block-group.is-layout-constrained {
  padding-left: 0;
  padding-right: 0;
}
/* Photo upload + map */
.ts-editor-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ts-upload-btn {
  cursor: pointer;
  margin: 0;
}

.ts-photo-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.ts-photo-thumb {
  width: 72px;
  height: 72px;
  border: 0;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: #E8EEF4;
  position: relative;
}

.ts-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ts-photo-thumb.is-active {
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.45);
}

.ts-photo-thumb-time {
  position: absolute;
  left: 4px;
  bottom: 4px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(21, 32, 51, 0.7);
  color: #F7F4EF;
  font-size: 0.62rem;
  font-weight: 700;
}

.ts-map-block {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(21, 32, 51, 0.08);
}

.ts-map {
  width: 100%;
  height: 220px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(21, 32, 51, 0.1);
  background: #d9e3ec;
  z-index: 0;
}

.ts-map-hint {
  margin: 8px 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #5A6B7D;
}

.ts-day-entry-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.ts-day-entry-photos img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
}

.leaflet-container {
  font: inherit;
}