:root {
  color-scheme: dark;
  --paper: #0b0d10;
  --paper-light: #f5f7fa;
  --ink: #f5f7fa;
  --muted: #9299a4;
  --line: #292e36;
  --line-strong: #434b57;
  --surface: #12151a;
  --surface-raised: #181c22;
  --header: rgba(11, 13, 16, 0.9);
  --accent: #79a8ff;
  --accent-text: #07101f;
  --field-line: #4a525f;
  --copy-muted: #b7bdc7;
  --icon-filter: invert(1);
  --success: #a5d6b3;
  --error: #ff8e86;
  --max: 1240px;
}

html[data-theme="light"] {
  color-scheme: light;
  --paper: #f5f6f8;
  --paper-light: #101216;
  --ink: #101216;
  --muted: #686f79;
  --line: #d7dbe1;
  --line-strong: #aeb4bd;
  --surface: #ffffff;
  --surface-raised: #eceff3;
  --header: rgba(245, 246, 248, 0.9);
  --accent: #245fce;
  --accent-text: #ffffff;
  --field-line: #aeb4bd;
  --copy-muted: #505761;
  --icon-filter: none;
  --success: #287746;
  --error: #c33932;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Helvetica, Arial, sans-serif;
  margin: 0;
  min-width: 320px;
  transition: background-color 180ms ease, color 180ms ease;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  border-radius: 0;
}

button,
select {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.ui-icon,
.theme-icon {
  filter: var(--icon-filter);
  height: 18px;
  transition: filter 160ms ease, transform 160ms ease;
  width: 18px;
}

[hidden] {
  display: none !important;
}

.shell {
  margin-inline: auto;
  max-width: var(--max);
  width: calc(100% - 64px);
}

.site-header {
  backdrop-filter: blur(18px);
  background: var(--header);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  align-items: center;
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr auto 1fr;
  min-height: 76px;
}

.wordmark {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.04em;
  width: max-content;
}

.header-inner nav {
  align-items: center;
  display: flex;
  gap: 32px;
}

.header-inner nav a {
  color: var(--muted);
  font-size: 13px;
  transition: color 160ms ease;
}

.header-inner nav a:hover,
.header-inner nav a:focus-visible,
.back-link:hover,
.back-link:focus-visible {
  color: var(--accent);
}

.header-tools {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-self: end;
}


.tallinn-clock {
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  min-width: 126px;
  text-align: right;
  white-space: nowrap;
}

.theme-toggle {
  align-items: center;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  display: inline-flex;
  height: 38px;
  justify-content: center;
  padding: 0;
  transition: background-color 160ms ease, border-color 160ms ease;
  width: 38px;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: var(--surface-raised);
  border-color: var(--ink);
  outline: 0;
}

.theme-toggle:hover .theme-icon {
  transform: rotate(12deg);
}

html[data-theme="dark"] .theme-icon-moon,
html[data-theme="light"] .theme-icon-sun {
  display: none;
}

.language-switch {
  display: flex;
  gap: 4px;
}

.language-switch button {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  padding: 7px;
}

.language-switch button.active {
  color: var(--ink);
  background: var(--surface-raised);
}

.section-label {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin: 0;
}

.hero {
  min-height: calc(100vh - 77px);
  padding: clamp(76px, 9vw, 132px) 0 52px;
}

.hero h1 {
  font-size: clamp(58px, 8.9vw, 126px);
  font-weight: 650;
  letter-spacing: -0.075em;
  line-height: 0.9;
  margin: 32px 0 clamp(70px, 10vw, 140px);
  max-width: 1160px;
}

.hero-bottom {
  align-items: end;
  border-top: 1px solid var(--line-strong);
  display: grid;
  gap: 48px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding-top: 20px;
}

.hero-bottom > p {
  font-size: clamp(18px, 2vw, 27px);
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin: 0;
  max-width: 720px;
}

.arrow-link {
  align-items: center;
  border-bottom: 1px solid var(--line-strong);
  display: flex;
  font-size: 13px;
  gap: 36px;
  padding: 9px 0;
}

.arrow-link:hover,
.arrow-link:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: 0;
}

.arrow-link:hover .ui-icon,
.arrow-link:focus-visible .ui-icon {
  transform: translateY(3px);
}

.work-section,
.about-section,
.services-section,
.contact-section {
  border-top: 1px solid var(--line-strong);
  padding: 34px 0 clamp(88px, 10vw, 150px);
}

.section-intro {
  align-items: start;
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr 2fr;
  margin-bottom: 54px;
}

.section-intro > p:last-child {
  font-size: 15px;
  margin: 0;
}

.work-list {
  border-top: 1px solid var(--line-strong);
}

.work-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 24px;
  grid-template-columns: 54px minmax(0, 1fr) minmax(190px, 300px) 28px;
  min-height: 122px;
  padding: 20px 18px 20px 0;
  transition: background 160ms ease, color 160ms ease, padding 160ms ease;
}

.work-row:hover,
.work-row:focus-visible {
  background: var(--accent);
  color: var(--accent-text);
  outline: 0;
  padding-left: 18px;
}

.work-number,
.work-type {
  color: var(--muted);
  font-size: 11px;
}

.work-type {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.work-live {
  display: flex;
  font-variant-numeric: tabular-nums;
  gap: 12px;
  opacity: 0.72;
}

.work-live b {
  color: var(--ink);
}

.work-row:hover .work-live b,
.work-row:focus-visible .work-live b {
  color: inherit;
}

.work-row:hover .work-number,
.work-row:hover .work-type,
.work-row:focus-visible .work-number,
.work-row:focus-visible .work-type {
  color: var(--accent-text);
  opacity: 0.7;
}

.work-title {
  font-size: clamp(27px, 3.5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.05em;
}

.work-arrow {
  justify-self: end;
}

.work-row:hover .ui-icon,
.work-row:focus-visible .ui-icon {
  filter: var(--icon-filter);
  transform: translate(3px, -3px);
}

html[data-theme="dark"] .work-row:hover .ui-icon,
html[data-theme="dark"] .work-row:focus-visible .ui-icon {
  filter: none;
}

.about-section {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr 2fr;
}

.about-copy h2 {
  font-size: clamp(38px, 5.4vw, 72px);
  letter-spacing: -0.06em;
  line-height: 0.98;
  margin: 0 0 42px;
  max-width: 880px;
}

.about-copy > p {
  color: var(--copy-muted);
  font-size: 18px;
  line-height: 1.55;
  margin: 0;
  max-width: 680px;
}

.services-section {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr 2fr;
}

.services-section .section-intro {
  display: block;
  margin: 0;
}

.service-list {
  border-top: 1px solid var(--line-strong);
  list-style: none;
  margin: 0;
  padding: 0;
}

.service-list li {
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 24px;
  grid-template-columns: 48px 1fr;
  padding: 22px 0;
}

.service-list span {
  color: var(--muted);
  font-size: 11px;
}

.service-list strong {
  font-size: clamp(23px, 3vw, 38px);
  letter-spacing: -0.04em;
}

.contact-section {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  display: grid;
  gap: clamp(54px, 8vw, 110px);
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  margin-bottom: 24px;
  padding: clamp(48px, 7vw, 88px);
}

.contact-section .section-label {
  color: var(--accent);
}

.contact-copy h2 {
  font-size: clamp(42px, 5vw, 68px);
  letter-spacing: -0.06em;
  line-height: 0.98;
  margin: 34px 0 70px;
}

.identity {
  align-items: center;
  display: flex;
  gap: 14px;
}

.identity img {
  border: 1px solid var(--line-strong);
  height: 52px;
  object-fit: cover;
  width: 52px;
}

.identity div {
  display: grid;
  gap: 4px;
}

.identity strong {
  font-size: 14px;
}

.identity span {
  color: var(--muted);
  font-size: 12px;
}

.form-grid {
  display: grid;
  gap: 26px;
  grid-template-columns: 1fr 1fr;
}

.form-grid label {
  display: grid;
  gap: 9px;
}

.form-grid label > span {
  color: var(--muted);
  font-size: 11px;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--field-line);
  color: var(--ink);
  outline: none;
  padding: 12px 0;
  width: 100%;
}

.form-grid select {
  background-color: var(--surface);
  color-scheme: inherit;
  padding-right: 30px;
}

.form-grid select option {
  background-color: var(--surface);
  color: var(--ink);
}

.form-grid textarea {
  line-height: 1.5;
  resize: vertical;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  border-bottom-color: var(--accent);
}

.form-grid input::placeholder,
.form-grid textarea::placeholder {
  color: var(--muted);
}

.form-message {
  grid-column: 1 / -1;
}

.form-trap {
  left: -9999px;
  position: absolute;
}

.submit-button {
  align-items: center;
  background: var(--accent);
  border: 1px solid var(--accent);
  color: var(--accent-text);
  display: flex;
  font-size: 13px;
  font-weight: 700;
  justify-content: space-between;
  margin-top: 34px;
  min-height: 54px;
  padding: 0 18px;
  width: 100%;
}

.submit-button:hover,
.submit-button:focus-visible {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
  outline: 0;
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.submit-button .ui-icon {
  filter: none;
}

html[data-theme="light"] .submit-button .ui-icon {
  filter: invert(1);
}

.submit-button:hover .ui-icon,
.submit-button:focus-visible .ui-icon {
  filter: var(--icon-filter);
  transform: translate(2px, -2px);
}

.form-feedback {
  font-size: 12px;
  margin: 15px 0 0;
}

.form-feedback.success {
  color: var(--success);
}

.form-feedback.error {
  color: var(--error);
}

.feedback-section {
  border-bottom: 1px solid var(--line-strong);
  border-top: 1px solid var(--line-strong);
  display: grid;
  gap: clamp(54px, 8vw, 110px);
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  margin-bottom: 80px;
  padding: clamp(60px, 8vw, 110px) 0;
}

.feedback-copy h2 {
  font-size: clamp(42px, 5vw, 68px);
  letter-spacing: -0.06em;
  line-height: 0.98;
  margin: 34px 0 0;
}

.rating-field {
  border: 0;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.rating-field legend {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 12px;
}

.rating-options {
  align-items: center;
  display: flex;
  flex-direction: row-reverse;
  gap: 10px;
  justify-content: flex-end;
}

.rating-options label {
  cursor: pointer;
  display: grid;
  place-items: center;
  position: relative;
}

.rating-options input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.rating-star {
  background: var(--field-line);
  display: block;
  height: 30px;
  -webkit-mask: url("icons/star.svg") center / contain no-repeat;
  mask: url("icons/star.svg") center / contain no-repeat;
  transition: background 150ms ease, transform 150ms ease;
  width: 30px;
}

.rating-options label:hover .rating-star,
.rating-options label:hover ~ label .rating-star,
.rating-options label:has(input:checked) .rating-star,
.rating-options label:has(input:checked) ~ label .rating-star {
  background: #f3bd55;
  transform: translateY(-1px);
}

.rating-options input:focus-visible + .rating-star {
  border-radius: 4px;
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.site-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: grid;
  font-size: 11px;
  grid-template-columns: 1fr auto auto auto;
  gap: 32px;
  min-height: 110px;
}

.site-footer > span:last-child {
  justify-self: end;
}

.site-footer b {
  font-weight: inherit;
}

.visitor-count {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.visitor-count b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.project-hero {
  align-items: stretch;
  display: grid;
  gap: clamp(50px, 8vw, 110px);
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  min-height: 700px;
  padding: 64px 0 80px;
}

.project-heading {
  align-self: center;
}

.back-link {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  gap: 10px;
  margin-bottom: 76px;
}

.project-heading h1 {
  font-size: clamp(62px, 8vw, 116px);
  letter-spacing: -0.075em;
  line-height: 0.88;
  margin: 34px 0;
}

.project-heading > p:last-child {
  font-size: 20px;
  line-height: 1.45;
  margin: 0;
  max-width: 620px;
}

.project-mark {
  align-items: center;
  align-self: stretch;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--accent);
  display: flex;
  font-size: clamp(72px, 10vw, 150px);
  font-weight: 800;
  justify-content: center;
  letter-spacing: -0.08em;
  min-height: 440px;
}

.image-mark {
  padding: clamp(42px, 7vw, 90px);
}

.image-mark img {
  max-height: 220px;
  object-fit: contain;
  width: 100%;
}

.lsa-mark {
  background: #7c4930;
}

.northweld-mark {
  background: #1f2b3d;
}

.project-meta {
  border-bottom: 1px solid var(--line-strong);
  border-top: 1px solid var(--line-strong);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.project-meta > div {
  border-right: 1px solid var(--line);
  display: grid;
  gap: 12px;
  min-height: 140px;
  padding: 28px 30px 28px 0;
}

.project-meta > div + div {
  padding-left: 30px;
}

.project-meta > div:last-child {
  border-right: 0;
}

.project-meta span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.project-meta strong,
.project-meta a {
  align-self: end;
  font-size: 16px;
}

.external-link,
.project-links a,
.project-end > a {
  align-items: center;
  display: inline-flex;
  gap: 9px;
  width: max-content;
}

.external-link .ui-icon,
.project-links .ui-icon,
.project-end > a .ui-icon {
  height: 15px;
  width: 15px;
}

.project-meta a:hover,
.project-meta a:focus-visible {
  color: var(--accent);
}

.project-meta a:hover .ui-icon,
.project-meta a:focus-visible .ui-icon,
.project-end a:hover .ui-icon,
.project-end a:focus-visible .ui-icon {
  transform: translate(2px, -2px);
}

.project-body {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr 2fr;
  padding-bottom: clamp(90px, 11vw, 160px);
  padding-top: clamp(90px, 11vw, 160px);
}

.project-body .section-intro {
  display: block;
  margin: 0;
}

.project-points {
  border-top: 1px solid var(--line-strong);
}

.project-points article {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 28px;
  grid-template-columns: 48px minmax(190px, 0.7fr) 1fr;
  padding: 30px 0;
}

.project-points article > span {
  color: var(--muted);
  font-size: 11px;
}

.project-points h2 {
  font-size: 24px;
  letter-spacing: -0.035em;
  margin: 0;
}

.project-points p {
  color: var(--copy-muted);
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
}

.project-end {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  margin-bottom: 80px;
  min-height: 210px;
  padding: 48px;
}

.project-end > p {
  font-size: clamp(27px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.05em;
  margin: 0;
}

.project-end > a,
.project-links {
  align-items: center;
  display: flex;
  gap: 28px;
}

.project-end a {
  border-bottom: 1px solid currentColor;
  font-size: 13px;
  padding: 8px 0;
}

.project-end a:hover,
.project-end a:focus-visible {
  color: var(--accent);
}

@media (max-width: 900px) {
  .shell {
    width: calc(100% - 36px);
  }

  .header-inner {
    gap: 16px;
    grid-template-columns: 1fr auto;
  }

  .header-inner nav {
    display: none;
  }

  .header-tools {
    grid-column: 2;
  }

  .hero {
    min-height: auto;
    padding-bottom: 80px;
  }

  .hero h1 {
    margin-bottom: 80px;
  }

  .section-intro,
  .about-section,
  .services-section,
  .project-body {
    grid-template-columns: 1fr;
  }

  .section-intro {
    gap: 18px;
  }

  .work-row {
    grid-template-columns: 42px 1fr 24px;
  }

  .work-type {
    display: none;
  }

  .contact-section {
    grid-template-columns: 1fr;
    padding: 48px 28px;
  }

  .feedback-section {
    grid-template-columns: 1fr;
  }

  .contact-copy h2 {
    margin-bottom: 42px;
  }

  .project-hero {
    gap: 50px;
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .project-heading {
    padding-top: 20px;
  }

  .back-link {
    margin-bottom: 54px;
  }

  .project-mark {
    min-height: 360px;
  }

  .project-meta {
    grid-template-columns: 1fr;
  }

  .project-meta > div,
  .project-meta > div + div {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    min-height: 100px;
    padding: 22px 0;
  }

  .project-meta > div:last-child {
    border-bottom: 0;
  }

  .project-points article {
    grid-template-columns: 38px 1fr;
  }

  .project-points p {
    grid-column: 2;
  }

  .project-end {
    align-items: flex-start;
    flex-direction: column;
    gap: 40px;
  }
}

@media (max-width: 560px) {
  .shell {
    width: calc(100% - 28px);
  }

  .header-inner {
    min-height: 62px;
  }

  .header-tools {
    gap: 8px;
  }

  .theme-toggle {
    height: 34px;
    width: 34px;
  }

  .language-switch button {
    padding: 6px;
  }

  .hero {
    padding-top: 64px;
  }

  .hero h1 {
    font-size: clamp(52px, 17vw, 82px);
    margin: 28px 0 64px;
  }

  .hero-bottom {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .hero-bottom > p {
    font-size: 18px;
  }

  .arrow-link {
    justify-content: space-between;
  }

  .work-section,
  .about-section,
  .services-section {
    padding-bottom: 90px;
  }

  .work-row {
    min-height: 100px;
  }

  .work-title {
    font-size: 25px;
  }

  .about-copy h2 {
    font-size: 40px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-message {
    grid-column: auto;
  }

  .contact-section {
    margin-bottom: 44px;
    padding: 38px 22px;
    width: calc(100% - 28px);
  }

  .feedback-section {
    margin-bottom: 44px;
    padding: 60px 0;
  }

  .site-footer {
    gap: 16px;
    grid-template-columns: 1fr auto auto;
    min-height: 90px;
  }

  .site-footer > span:nth-child(2) {
    display: none;
  }

  .project-heading h1 {
    font-size: clamp(54px, 17vw, 84px);
  }

  .project-heading > p:last-child {
    font-size: 17px;
  }

  .project-mark {
    min-height: 300px;
  }

  .project-points article {
    gap: 14px;
  }

  .project-points h2 {
    font-size: 21px;
  }

  .project-end {
    margin-bottom: 44px;
    padding: 34px 24px;
    width: calc(100% - 28px);
  }

  .project-links {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}

.developer-peek {
  background: none;
  border: 0;
  box-shadow: none;
  display: block;
  font-size: 38px;
  height: auto;
  line-height: 1;
  margin: 0;
  opacity: 0;
  padding: 0;
  pointer-events: none;
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  top: max(18px, env(safe-area-inset-top));
  transform: translateY(-18px) rotate(5deg) scale(0.72);
  transform-origin: top right;
  visibility: hidden;
  width: auto;
  z-index: 2147483647;
}

.developer-peek.show {
  animation: developer-peek-in 950ms cubic-bezier(0.2, 0.8, 0.2, 1);
  visibility: visible;
}

@keyframes developer-peek-in {
  0% {
    opacity: 0;
    transform: translateY(-18px) rotate(5deg) scale(0.72);
  }
  24%, 68% {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px) rotate(-3deg) scale(0.9);
  }
}

@media (prefers-reduced-motion: reduce) {
  .developer-peek.show {
    animation-duration: 500ms;
  }
}

/* Daily mood check-in */
.mood-checkin {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.28);
  left: max(18px, env(safe-area-inset-left));
  max-width: min(360px, calc(100vw - 36px));
  padding: 22px;
  position: fixed;
  top: max(82px, calc(env(safe-area-inset-top) + 72px));
  transform: translateY(-12px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  width: 100%;
  z-index: 2147483000;
}

.mood-checkin[hidden] {
  display: block;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.mood-checkin.show {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.mood-question {
  margin: 0 0 18px;
}

.mood-question strong {
  font-size: 20px;
  letter-spacing: -0.03em;
}


.mood-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.mood-choice {
  align-items: center;
  background: var(--surface-raised);
  border: 1px solid var(--field-line);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  gap: 10px;
  justify-content: center;
  min-height: 54px;
  padding: 10px;
}

.mood-choice:hover,
.mood-choice:focus-visible {
  border-color: var(--ink);
}

.mood-choice-icon {
  color: currentColor;
  height: 30px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 30px;
}

.mood-choice-label {
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.mood-reason {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 18px;
}

.mood-reason[hidden] {
  display: none;
}

.mood-reason p {
  font-size: 14px;
  line-height: 1.4;
  margin: 0 0 12px;
}

.mood-reason textarea {
  background: var(--surface-raised);
  border: 1px solid var(--field-line);
  color: var(--ink);
  font: inherit;
  min-height: 92px;
  padding: 12px;
  resize: vertical;
  width: 100%;
}

.mood-reason-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
}

.mood-reason-actions button {
  background: transparent;
  border: 1px solid var(--field-line);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  padding: 10px 14px;
}

.mood-reason-actions button:last-child {
  background: var(--ink);
  color: var(--paper);
}

.mood-thanks {
  font-size: 14px;
  margin: 0;
}

/* Shared drawing board */
.board-page {
  overflow-x: hidden;
}

.board-main {
  min-height: 100vh;
  padding-bottom: 48px;
}

.board-intro {
  padding-bottom: 50px;
  padding-top: 62px;
}

.board-intro .back-link {
  margin-bottom: 54px;
}

.board-intro h1 {
  font-size: clamp(46px, 7vw, 96px);
  letter-spacing: -0.07em;
  line-height: 0.95;
  margin: 24px 0 28px;
  max-width: 1050px;
}

.board-intro > p:last-child {
  color: var(--copy-muted);
  font-size: 18px;
  line-height: 1.5;
  margin: 0;
  max-width: 720px;
}

.board-workspace {
  background: var(--surface);
  border-bottom: 1px solid var(--line-strong);
  border-top: 1px solid var(--line-strong);
  margin: 0 auto;
  width: min(1720px, calc(100% - 28px));
}

.board-toolbar {
  align-items: center;
  border-bottom: 1px solid var(--line-strong);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  min-height: 78px;
  padding: 12px 16px;
}

.board-tool-group,
.board-color-group,
.board-zoom-controls {
  align-items: center;
  display: flex;
  gap: 7px;
}

.board-tool,
.board-zoom-controls button,
.board-clear-mine {
  align-items: center;
  background: var(--surface-raised);
  border: 1px solid var(--field-line);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 11px;
  gap: 7px;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
}

.board-tool:hover,
.board-tool:focus-visible,
.board-zoom-controls button:hover,
.board-zoom-controls button:focus-visible,
.board-clear-mine:hover,
.board-clear-mine:focus-visible,
.board-tool.active {
  border-color: var(--ink);
}

.board-tool.active {
  background: var(--ink);
  color: var(--paper);
}

.board-color {
  appearance: none;
  background-color: #111111;
  border: 2px solid transparent;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--field-line);
  cursor: pointer;
  height: 26px;
  padding: 0;
  width: 26px;
}


.board-color[data-board-color="#ffffff"] { background-color: #ffffff; }
.board-color[data-board-color="#111111"] { background-color: #111111; }
.board-color[data-board-color="#ff5d5d"] { background-color: #ff5d5d; }
.board-color[data-board-color="#f3bd55"] { background-color: #f3bd55; }
.board-color[data-board-color="#58d68d"] { background-color: #58d68d; }
.board-color[data-board-color="#59a8ff"] { background-color: #59a8ff; }
.board-color[data-board-color="#b879ff"] { background-color: #b879ff; }

.board-color.active {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink);
}

.board-size-control {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 11px;
  gap: 9px;
}

.board-size-control input {
  accent-color: var(--ink);
  width: 112px;
}

.board-size-control output,
.board-zoom-controls output {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  min-width: 34px;
  text-align: right;
}

.board-zoom-controls {
  margin-left: auto;
}

.board-clear-mine:disabled {
  cursor: wait;
  opacity: 0.55;
}

.board-stage {
  height: min(74vh, 900px);
  min-height: 560px;
  overflow: hidden;
  position: relative;
}

.board-stage canvas {
  cursor: crosshair;
  display: block;
  height: 100%;
  touch-action: none;
  width: 100%;
}

.board-stage canvas[data-tool="pan"],
.board-stage canvas[data-space-pan="true"] {
  cursor: grab;
}

.board-stage canvas[data-panning="true"] {
  cursor: grabbing;
}

.board-stage canvas[data-tool="erase"] {
  cursor: cell;
}

.board-live-status,
.board-help {
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  border: 1px solid var(--line);
  bottom: 16px;
  font-size: 11px;
  padding: 9px 11px;
  pointer-events: none;
  position: absolute;
}

.board-live-status {
  align-items: center;
  display: flex;
  gap: 8px;
  left: 16px;
}

.board-help {
  color: var(--muted);
  max-width: min(520px, calc(100% - 32px));
  right: 16px;
}

.board-live-dot {
  background: #58d68d;
  border-radius: 50%;
  height: 7px;
  width: 7px;
}

.board-live-dot[data-state="error"] {
  background: #ff5d5d;
}

@media (max-width: 900px) {
  .board-toolbar {
    align-items: flex-start;
  }

  .board-zoom-controls {
    margin-left: 0;
  }

  .board-stage {
    height: 68vh;
    min-height: 480px;
  }

  .board-help {
    display: none;
  }
}

@media (max-width: 560px) {
  .mood-checkin {
    left: 14px;
    max-width: calc(100vw - 28px);
    padding: 18px;
    top: 74px;
  }

  .board-intro {
    padding-bottom: 36px;
    padding-top: 42px;
  }

  .board-intro .back-link {
    margin-bottom: 38px;
  }

  .board-intro h1 {
    font-size: clamp(44px, 15vw, 68px);
  }

  .board-workspace {
    width: 100%;
  }

  .board-toolbar {
    gap: 10px;
    padding: 10px;
  }

  .board-tool span:last-child {
    display: none;
  }

  .board-size-control {
    width: 100%;
  }

  .board-size-control input {
    flex: 1;
  }

  .board-clear-mine {
    width: 100%;
  }

  .board-stage {
    height: 70vh;
    min-height: 500px;
  }
}

@media (max-width: 820px) {
  .tallinn-clock {
    font-size: 9px;
    min-width: 112px;
  }
}

@media (max-width: 420px) {
  .header-inner {
    min-height: 94px;
    position: relative;
  }

  .tallinn-clock {
    bottom: 7px;
    left: 0;
    min-width: 0;
    position: absolute;
    text-align: left;
  }

  .mood-checkin {
    top: 106px;
  }
}
