/* ============================================================
   DESIGN TOKENS
   warm paper / ink
   positive      — soft moss green
   negative      — muted wine
   accent        — deep indigo
   ============================================================ */
:root{
  --paper: #F2EFE7;
  --paper-warm: #EAE4D8;
  --card: rgba(255, 255, 255, 0.99);
  --card-soft: #f3f6e8;

  --ink: #000000;
  --ink-muted: #2e2d2a;
  --ink-faint: #93908c;

  --positive: rgba(137, 182, 36, 0.8);
  --positive-soft: rgba(228, 228, 203, 0.94);
  --positive-hover: #f6f6e6;

  --negative: rgba(120, 107, 107, 0.84);
  --negative-soft: rgb(158, 142, 143);
  --negative-hover: #bfb5b7;

  --accent: #ffffff;
  --accent-soft: rgba(83, 87, 85, 0.53);

  --line: #D8D0C2;
  --shadow: 0 18px 45px rgba(31, 30, 26, .08);
  --shadow-soft: 0 8px 24px rgba(31, 30, 26, .05);

  --radius: 16px;
}

/* ---------- compact emotion annotation ---------- */
.progress-label{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding-block:0;
  margin-inline:16px;
  margin-bottom:1rem;
  color:var(--accent);
  font-size:12px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.progress-rail{
  display:flex;
  gap:6px;
  width:auto;
  margin-inline:16px;
  margin-bottom:1rem;
  border:1px;
  border-color:var(--line);
}

.progress-rail .tick{
  flex:1;
  height:6px;
  border:1px;
  border-color:var(--line);
  border-radius:999px;
  background:var(--accent-soft);
}

.progress-rail .tick.done,
.progress-rail .tick.current{
    border:1px;
  border-color:var(--line);
  background:var(--accent);
}

.emotion-wheel-progress{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
  margin:14px auto 0;
}

.emotion-wheel-progress[hidden]{
  display:none;
}

.emotion-wheel{
  position:relative;
  width:208px;
  height:208px;
}

.emotion-wheel-leaf{
  position:absolute;
  left:50%;
  top:50%;
  width:50px;
  height:112px;
  border:2px solid rgba(31,30,26,.18);
  border-radius:75% 75% 48% 48%;
  background:var(--line);
  opacity:.42;
  transform-origin:50% 100%;
  transform:
    translate(-50%, -100%)
    rotate(calc(var(--leaf-index) * 45deg))
    translateY(14px);
  transition:background-color .18s ease, opacity .18s ease, filter .18s ease;
}

.emotion-wheel-leaf[data-strength="0"]{
  background:var(--emotion-color);
  opacity:.48;
}

.emotion-wheel-leaf[data-strength="1"]{
  background:var(--emotion-color);
  opacity:.66;
}

.emotion-wheel-leaf[data-strength="2"]{
  background:var(--emotion-color);
  opacity:.84;
}

.emotion-wheel-leaf[data-strength="3"]{
  background:var(--emotion-color);
  opacity:1;
  filter:saturate(1.08);
}

.emotion-wheel-center{
  position:absolute;
  left:50%;
  top:50%;
  z-index:2;
  width:44px;
  height:44px;
  border:1px solid rgba(110,104,92,.16);
  border-radius:50%;
  background:rgba(234,228,216,.82);
  box-shadow:0 1px 4px rgba(31,30,26,.04);
  transform:translate(-50%, -50%);
}

.emotion-task-body{
  padding-top:24px;
  padding-bottom:32px;
}

.emotion-task-body .emotion-page{
  max-width:680px;
}

.emotion-page .progress-label{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding-block:0;
  margin-inline:16px;
  margin-bottom:1rem;
  color:var(--accent);
  font-size:12px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.emotion-page .emotion-target-word{
  margin:14px 0;
  padding:12px 18px;
  font-size:clamp(30px, 5vw, 42px);
}

.meaning-question{
  width:100%;
  min-width:0;
  min-inline-size:0;
  box-sizing:border-box;
  overflow:hidden;
  margin:0;
  padding:14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--card);
  box-shadow:var(--shadow-soft);
}

.meaning-question-title{
  display:block;
  width:100%;
  box-sizing:border-box;
  white-space:normal;
  overflow-wrap:anywhere;
  margin:0 0 8px;
  font-family:Georgia, "Times New Roman", serif;
  font-size:18px;
  font-weight:400;
  color:var(--ink);
}

.meaning-question-heading{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:8px;
}

.meaning-question-heading .meaning-question-title{
  flex:1;
  width:auto;
  margin:0;
}

.meaning-hint-toggle{
  width:22px;
  height:22px;
  min-height:0;
  padding:0;
  border:1px solid var(--line);
  border-radius:50%;
  background:var(--card-soft);
  color:var(--ink-muted);
  font-size:14px;
  font-weight:700;
  line-height:1;
  cursor:pointer;
}

.meaning-hint-toggle:hover,
.meaning-hint-toggle[aria-expanded="true"]{
  border-color:var(--accent);
  color:var(--accent);
}

.meaning-hint{
  margin:0 0 10px;
  color:var(--ink-muted);
  font-size:12px;
}

.meaning-options{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
}

.discard-comment-panel{
  display:grid;
  gap:8px;
  margin-top:12px;
}

.discard-comment-panel[hidden],
.meaning-discard-submit[hidden]{
  display:none !important;
}

.discard-comment-panel label{
  display:grid;
  gap:5px;
  color:var(--ink);
  font-size:13px;
  font-weight:650;
}

.discard-comment-panel textarea{
  width:100%;
  box-sizing:border-box;
  padding:9px 10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--card);
  color:var(--ink);
  font:inherit;
  font-weight:400;
  resize:vertical;
}

.discard-comment-panel textarea:focus{
  border-color:var(--accent);
  outline:2px solid var(--accent-soft);
}

.meaning-discard-submit{
  justify-self:start;
}

.meaning-option{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  min-width:0;
  min-height:42px;
  padding:9px 12px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--card);
  color:var(--ink);
  font-size:14px;
  font-weight:650;
  cursor:pointer;
  transition:background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.meaning-option-similar{
  padding:9px 12px;
}

.meaning-option-similar:hover,
.meaning-option-similar:has(input:checked){
  border-color:var(--accent);
}

.meaning-option:hover{
  border-color:var(--negative);
  background-color:var(--accent);

}

.meaning-option:has(input:checked){
  border-color:var(--accent);
  background:var(--accent-soft);
  box-shadow:0 0 0 1px var(--accent);
}

.meaning-option:has(input:focus-visible){
  outline:2px solid var(--accent);
  outline-offset:2px;
}

.meaning-option input{
  position:absolute;
  width:1px;
  height:1px;
  margin:-1px;
  padding:0;
  overflow:hidden;
  clip:rect(0 0 0 0);
  clip-path:inset(50%);
  white-space:nowrap;
  border:0;
}

.meaning-option span{
  overflow-wrap:anywhere;
}

.meaning-option.is-disabled{
  opacity:.42;
  filter:grayscale(1);
  cursor:not-allowed;
  pointer-events:none;
}

.meaning-option-unknown{
  border-color: rgba(11, 18, 16, 0.45);
  background:var(--paper);
  color:var(--ink);
}

.meaning-option-unknown:hover,
.meaning-option-unknown:has(input:checked){
  border-color:var(--ink-muted);
 background-color:var(--accent-soft);
  box-shadow:0 0 0 1px var(--negative);
}

.emotion-question{
  margin-top:14px;
}

.emotion-step-panel[hidden],
.emotion-rating-row[hidden],
.emotion-actions button[hidden]{
  display:none !important;
}

.emotion-question > h1{
  margin:0 0 2px;
  font-size:18px;
}

.emotion-question > p{
  margin:0 0 10px;
  color:var(--ink-muted);
  font-size:13px;
}

.emotion-question.is-cannot-judge > h1,
.emotion-question.is-cannot-judge > p{
  opacity:.45;
}

.emotion-page .emotion-rating-list{
  display:block;
  gap:9px;
  margin-top:0;
}

.emotion-page .emotion-rating-row{
  width:100%;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}

.emotion-page .emotion-rating-header{
  margin-bottom:0;
  text-align:left;
}

.emotion-page .emotion-rating-header h2{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  width:100%;
  text-align:left;
  gap:7px;
  margin:4px 0 6px;
  font-family:system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size:17px;
  font-weight:750;
}

.emotion-emoji{
  font-size:19px;
  line-height:1;
}

.emotion-check-options{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:5px;
}

.emotion-check-option{
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:0;
  min-height:42px;
  padding:9px 10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--card);
  color:var(--ink);
  font-size:14px;
  font-weight:650;
  text-align:center;
  cursor:pointer;
  transition:
    background .15s ease,
    border-color .15s ease,
    box-shadow .15s ease,
    transform .15s ease;
}

.emotion-check-option:hover{
  border-color:var(--negative);
  background-color:var(--accent);

}

.emotion-check-option:has(input:checked){
  border-color:var(--accent);
  background:var(--accent-soft);
  box-shadow:0 0 0 1px var(--accent);
}

.emotion-check-option:has(input:focus-visible){
  outline:2px solid var(--accent);
  outline-offset:2px;
}

.emotion-check-option input{
  position:absolute;
  width:1px;
  height:1px;
  margin:-1px;
  padding:0;
  overflow:hidden;
  clip:rect(0 0 0 0);
  clip-path:inset(50%);
  white-space:nowrap;
  border:0;
}

.emotion-check-option span{
  overflow-wrap:anywhere;
}

.emotion-page .emotion-veselje{ --emotion-color:rgba(229,210,26,.78); }
.emotion-page .emotion-sprejemanje{ --emotion-color:#A8C94A; }
.emotion-page .emotion-strah{ --emotion-color:rgba(69,112,35,.78); }
.emotion-page .emotion-presenecenje{ --emotion-color:#67BDD0; }
.emotion-page .emotion-zalost{ --emotion-color:#427BB7; }
.emotion-page .emotion-gnus{ --emotion-color:#754E91; }
.emotion-page .emotion-jeza{ --emotion-color:rgba(180,73,63,.78); }
.emotion-page .emotion-pricakovanje{ --emotion-color:#D47A32; }

.emotion-page .emotion-rating-row.is-cannot-judge{
  opacity:.45;
}

.emotion-page .emotion-actions{
  margin-top:16px;
}

@media (max-width:650px){
  .emotion-task-body{
    padding-bottom:28px;
  }

  .meaning-options{
    grid-template-columns:1fr;
  }

  .emotion-page .emotion-rating-list{
    grid-template-columns:1fr;
  }

  .emotion-page .emotion-check-options{
    grid-template-columns:1fr;
  }

  .emotion-page .emotion-rating-row{
    padding:0;
  }

  .emotion-page .emotion-rating-header{
    flex-direction:row;
    margin-bottom:4px;
  }

  .emotion-question > h1{
    font-size:18px;
  }
}

*{ box-sizing: border-box; }

html,body{
  margin:0;
  padding:0;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}

body{
  min-height: 100vh;
  min-height:100dvh;
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:clamp(12px, 5vw, 48px) clamp(8px, 3vw, 20px) clamp(28px, 7vw, 64px);
}

body.task-one-body,
body.emotion-task-body,
body.index-body,
body.task-one-done-body,
body.task-two-done-body{
  position:relative;
  isolation:isolate;
  background-image:none;
}

body.task-one-body::before,
body.emotion-task-body::before,
body.index-body::before,
body.task-one-done-body::before,
body.task-two-done-body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  background:
    linear-gradient(rgba(2,2,2,.50), rgba(2,2,2,.50)),
    url("2/bryan2.jpg") center / cover no-repeat;
}

.card,
.wrap{
  width:100%;
  max-width:680px;
  min-width:0;
}

main,
section,
form,
.text-card,
.next-step{
  min-width:0;
}

img,
svg,
video{
  max-width:100%;
  height:auto;
}

.display-size-control{
  display:none;
}

@media (min-width:621px){
  body:is(
    .index-body,
    .task-one-body,
    .emotion-task-body,
    .task-one-done-body,
    .task-two-done-body
  ) > :is(main.card, main.wrap){
    width:76.923%;
    zoom:1.3;
  }
}

/* Secondary consent/form copy is two font steps smaller than the main text. */
.index-page .info,
.index-page .check,
.index-page .field label,
.index-page .field input,
.index-page .field select,
.index-page .field select option{
  font-size:13px;
}

@media (max-width:620px){
  .index-page .info,
  .index-page .check,
  .index-page .field label,
  .index-page .field input,
  .index-page .field select,
  .index-page .field select option{
    font-size:calc(15px * var(--mobile-display-scale));
  }
}

/* Shared task-choice panels used on the index and completion pages. */
.next-step{
  width:100%;
  margin:0 auto 18px;
  padding:14px 20px;
  display:grid;
  grid-template-columns:1fr;
  gap:8px 8px;
  align-items:center;
  position:relative;
  isolation:isolate;
  overflow:hidden;
  background: var(--card);
  border:1px solid var(--ink-muted);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  color:var(--ink);
}

.next-step h2{
  margin:0 0 6px;
  font-size:18px;
  font-weight:600;
}

.next-step-heading{
  display:flex;
  align-items:center;
  gap:5px;
}

.next-step-heading h2{
  flex:1;
  margin:0;
}

.next-step-heading .meaning-hint-toggle{
  flex:0 0 auto;
}

.next-step p{
  grid-column:1 / -1;
  margin:6px;
  color:#000;
}

.next-step .btn,
.next-step form{
  grid-column:1 / -1;
  width:100%;
}

.next-step .btn{
  padding:14px 18px;
  text-align:center;
  text-decoration:none;
}

@media (max-width:460px){
  .next-step{padding:18px;}
}

/* Completion-page layout; task-choice cards use the shared .next-step styles above. */
:is(.done-page, .emotion-done-page) .done-intro{
  width:100%;
  margin:0 0 22px;
  text-align:left;
}

:is(.done-page, .emotion-done-page) .done-intro p{
  margin:0;
}

:is(.done-page, .emotion-done-page) .next-step p{
  font-size:15px;
}

:is(.done-page, .emotion-done-page) .task-choice-row{
  width:75%;
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
  align-items:stretch;
  margin:0 0 18px;
}

.emotion-done-page .task-choice-row{
  min-width:min(100%, 500px);
  max-width:100%;
}

:is(.done-page, .emotion-done-page) .task-choice-row .next-step{
  height:100%;
  margin:0;
}

.emotion-done-page .task-choice-row .next-step{
  grid-template-columns:64px minmax(0, 1fr) auto;
  column-gap:12px;
  align-items:start;
  align-content:start;
}

.emotion-done-page .task-choice-row .task-description-copy{
  grid-column:2;
  grid-row:1;
  min-width:0;
  padding-left:16px;
  border-left:3px solid var(--line);
  align-self:center;
}

.emotion-done-page .task-choice-row .task-description-copy > h2{
  margin:0;
  font-family:Georgia, serif;
  font-size:15px;
  overflow-wrap:anywhere;
}

.emotion-done-page .task-description-toggle{
  width:20px;
  height:20px;
  min-height:0;
  padding:0;
  margin-left:2px;
  font-size:11px;
  line-height:1;
  vertical-align:super;
  transform:translateY(-3px);
}

.emotion-done-page .task-description-toggle:hover:not(:disabled){
  transform:translateY(-4px);
}

.emotion-done-page .task-choice-row .task-preview{
  grid-column:1;
  grid-row:1 / span 2;
  width:100%;
  align-self:center;
}

.emotion-done-page .task-choice-row .preview-petals{
  width:58px;
  height:58px;
  transform:scale(.7);
  transform-origin:center;
}

.emotion-done-page .task-choice-row .sentiment-scale{
  margin-top:12px;
}

.emotion-done-page .task-choice-row .sentiment-preview figcaption{
  font-size:9px;
}

.emotion-done-page .task-choice-row form{
  grid-column:3;
  grid-row:1;
  width:auto;
  margin:0;
  display:block;
  align-self:center;
}

.emotion-done-page .task-choice-row form .btn{
  width:110px;
  min-width:0;
}

.emotion-done-page .task-choice-row form p{
  grid-column:1 / -1;
  margin:5px 0 0;
}

#emotion-done-step-one-description,
#emotion-done-step-two-description{
  width:100%;
  margin:7px 0px 0 0;
  color:var(--ink-muted);
  font-size:15px;
}

.step-complete{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding-block:0;
  margin-inline:16px;
  margin-bottom:1rem;
  color:var(--accent);
  font-size:12px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.done-page .secondary-actions{
  width:100%;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin:0 0 30px;
}

.done-page .secondary-actions form,
.done-page .secondary-actions .btn,
.done-page .secondary-actions button{
  width:100%;
  margin:0;
}

.done-page .share-status{
  width:100%;
  margin:-18px 0 24px;
  color:var(--ink-muted);
  font-size:14px;
  text-align:center;
  min-height:1.4em;
}

.done-page #choices-card{
  max-width:none;
  width:100%;
  margin:0;
}

@media (max-width:460px){
  .done-page .secondary-actions{grid-template-columns:1fr;}
}

@media (max-width:620px){
  .index-page form > button[type="submit"]{
    width:min(100%, 18rem);
    max-width:100%;
  }

  /* Figure | divider | title and description. */
  .index-page .task-description{
    grid-template-columns:70px minmax(0, 1fr);
    column-gap:14px;
    padding:8px 0;
    border-left:0;
    align-items:center;
  }

  .index-page .task-description .task-preview{
    grid-column:1;
    grid-row:1;
    width:82px;
    max-width:82px;
    margin:0 0 0 -12px;
    justify-self:start;
    align-self:center;
  }

  .index-page .task-description-copy{
    grid-column:2;
    grid-row:1;
    min-width:100px;
    padding-left:16px;
    border-left:3px solid var(--line);
  }

  :is(.done-page, .emotion-done-page) .task-choice-row{
    width:100%;
    grid-template-columns:1fr;
  }

  .emotion-done-page .task-choice-row .next-step{
    grid-template-columns:72px minmax(0, 1fr);
    column-gap:4px;
    align-items:center;
    padding-left:12px;
  }

  .emotion-done-page .task-choice-row .task-description-copy{
    grid-column:2;
    grid-row:1;
    border-left:0;
    padding-left:8px;
  }

  .emotion-done-page .task-choice-row .task-preview{
    grid-column:1;
    grid-row:1 / span 2;
    border-right:3px solid var(--line);
    padding-right:6px;
    align-self:stretch;
    display:grid;
    place-items:center;
  }

  .emotion-done-page .task-choice-row .task-one-card .sentiment-tile-grid{
    margin:0;
    transform:scale(.8);
    transform-origin:center;
  }

  .emotion-done-page .task-choice-row .task-two-card .preview-petals{
    margin:0;
    transform-origin:center;
  }

  #emotion-done-step-one-description,
  #emotion-done-step-two-description{
    grid-column:2;
  }

  .emotion-done-page .task-choice-row form{
    grid-column:2;
    grid-row:2;
    width:calc(100% - 8px);
    margin:0 0 0 8px;
    justify-self:start;
    align-self:center;
  }

  .emotion-done-page .task-choice-row .next-step:has(
    #emotion-done-step-one-description:not([hidden]),
    #emotion-done-step-two-description:not([hidden])
  ) form{
    margin-top:10px;
  }

  .emotion-done-page .task-choice-row form .btn{
    width:100%;
  }
}

@media (min-width:621px) and (max-width:800px){
  .emotion-done-page .task-choice-row{
    width:100%;
  }
}

@media (min-width:621px){
  .emotion-done-page .task-choice-row .next-step{
    grid-template-columns:70px minmax(0, 240px) minmax(0, 0.8fr) 120px;
    column-gap:4px;
    padding:10px 12px;
  }

  .emotion-done-page .task-choice-row .task-description-copy{
    border-left:0;
    padding-left:8px;
    width:100%;
    max-width:none;
  }

  .emotion-done-page .task-choice-row .task-preview{
    border-right:3px solid var(--line);
    padding-right:6px;
  }

  .emotion-done-page .task-choice-row .task-one-card .sentiment-tile-grid{
    transform:scale(.8);
    transform-origin:center;
  }

  .emotion-done-page .task-choice-row form{
    grid-column:4;
    margin-left:0;
    justify-self:end;
  }

  .emotion-done-page .task-choice-row .next-step:has(
    #emotion-done-step-one-description:not([hidden]),
    #emotion-done-step-two-description:not([hidden])
  ) .task-description-copy{
    padding-right:8px;
  }
}

@media (min-width:801px){
  .emotion-done-page .task-choice-row{
    width:70%;
    min-width:min(100%, 460px);
  }
}

main.card,
main.wrap{
  background: transparent;
  border: none;
  box-shadow: none;
}

.panel{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-soft);
}



h1{
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: clamp(18px, 3vw, 26px);
  line-height: 1.12;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h2{
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  margin: 30px 0 12px;
  color: var(--ink);
}

h3{
  margin:0 0 6px;
  color:var(--ink);
}

p{
  color:#000;
}

.text-card{
  padding:14px 24px;
  background: rgba(255, 255, 255, 0.94);
  border:2px solid rgb(18, 17, 17);
  border-radius:10px;
}

.index-page .text-card{
  isolation:isolate;
}

.index-page .text-card > :not(.example-questions){
  position:relative;
  z-index:2;
}

.index-page .example-questions{
  position:relative;
  z-index:1;
}

.index-page .example-question > em{
  position:relative;
  z-index:1;
}

/* Keep the first-task panel consistent with text and instruction cards. */
.task-one-body .task-choice-card{
  background:rgba(255,255,255,.94);
  border:2px solid rgb(18,17,17);
  border-radius:10px;
}

/* Emotion tasks use the same single-card hierarchy as the word task. */
.emotion-task-card .meaning-question{
  padding:0;
  overflow:visible;
  background:transparent;
  border:0;
  border-radius:0;
  box-shadow:none;
}

a{
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

hr{
  border: 0;
  border-top: 1px solid var(--line);
  margin: 28px 0;
}


button,
.btn{
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  border-radius: 8px;
  padding: 15px 15px;
  cursor: pointer;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  transition:
    transform .15s ease,
    opacity .15s ease,
    background .15s ease,
    border-color .15s ease,
    box-shadow .15s ease;
}

button:hover:not(:disabled),
.btn:hover:not(:disabled){
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(31,30,26,.12);
}

button:active:not(:disabled),
.btn:active:not(:disabled){
  transform: translateY(0);
  box-shadow:none;
}

button:disabled,
.btn:disabled{
  opacity: .65;
  cursor: default;
}

.btn-accent{
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}
.btn-accent2{
  background-color: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

@media (min-width:621px){
  .next-step .task-one-image-button,
  .next-step .task-two-image-button,
  .next-step .btn-accent2{
    font-size:16px;
  }
}

.btn-positive{
  background: var(--positive);
  border-color: var(--positive);
  color: white;
}

.btn-negative{
  background: var(--negative);
  border-color: var(--negative);
  color: white;
}

.btn-ghost{
  background: white;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover:not(:disabled){
  background: var(--card-soft);
}

.choice-step{
  margin: 0 0 16px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: border-color .15s ease, background .15s ease;
}

.choice-title-row{
  display:flex;
  align-items:center;
  gap:8px;
}

.choice-title-row .choice-title{
  flex:1;
}

.task-one-body #choice-hint-toggle{
  width:30px;
  height:30px;
  flex:0 0 30px;
  font-size:18px;
}

.task-one-body #choice-hint-toggle:hover,
.task-one-body #choice-hint-toggle[aria-expanded="true"]{
  background:var(--ink-muted);
  border-color:var(--ink-muted);
  color:#fff;
}

.task-one-body .task-choice-card > .meaning-hint{
  margin:6px 38px 10px 56px;
}

.choice-step .meaning-hint-toggle{
  flex:0 0 auto;
  margin:0;
}

.choice-step .meaning-hint{
  flex-basis:100%;
  margin:0;
}

.choice-step-positive{
  border-color: rgba(47,107,79,.32);
  background: var(--positive-hover);
}

.choice-step-negative{
  border-color: rgba(122,46,61,.32);
  background: var(--negative-hover);
}

.choice-emoji{
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.choice-title{
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(18px, 3vw, 24px);
  line-height: 1.15;
  color: var(--ink);
}

.choice-polarity{
  font-weight:700;
}

.choice-polarity-positive{
  color:var(--positive);
}

.choice-polarity-negative{
  color:var(--negative);
}

.task-choice-card .cue-grid{
  padding:14px 0 0;
}

.set-card{
  background:rgba(255,255,255,.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow-soft);
}

.cue-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:14px;
  padding:20px;
}

.cue-button{
  min-height:110px;
  width:100%;
  display:flex;
  flex-direction:column;
  gap:8px;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:18px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--card-soft);
  color:var(--ink);
  font:inherit;
  font-weight:700;
  cursor:pointer;
  overflow-wrap:anywhere;
  white-space:normal;
  line-height:1.25;
}

.cue-button:hover:not(:disabled),
.cue-button:focus-visible{
  transform: none;
  outline: none;
  border-color: var(--accent);
}

.cue-button.preview-positive{
  background: var(--accent);
  color: var(--ink);
  font-style:italic;
  border-color: rgba(47,107,79,.35);
  box-shadow: inset 4px 0 0 rgba(47,107,79,.35);
}

.cue-button.preview-negative{
  background: var(--accent);
  border-color: rgba(122,46,61,.35);
  box-shadow: inset 4px 0 0 rgba(122,46,61,.35);
}

.cue-button.is-positive{
  background: var(--positive-soft);
  font-style:italic;
  border-color: rgba(0, 0, 0, 0.25);
  box-shadow: inset 4px 0 0 var(--positive);
}

.cue-button.is-negative{
  background: var(--positive-soft);
    font-style:italic;
  border-color: rgba(0, 0, 0, 0.25);
  box-shadow: inset 4px 0 0 var(--negative);
}


.note{
  margin:22px 0;
  padding:14px 16px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  color:#000;
  box-shadow:0 6px 18px rgba(31,30,26,.05);
}

.note small{
  display:block;
  color:inherit;
  font-size:0.88rem;
  line-height:1.55;
}

.index-page p{
  font-size:15px;
  line-height:1.5;
}

.index-page .example-questions{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:2px;
  margin:14px 0 20px;
}

.index-page .example-question{
  flex:1 1 0;
  max-width:175px;
  margin:0;
  aspect-ratio:var(--bubble-ratio, 1.15);
  padding:var(--bubble-padding, 18px 20px 38px);
  display:grid;
  place-items:center;
  border:0;
  background-color:transparent;
  background-position:center;
  background-repeat:no-repeat;
  background-size:contain;
  box-shadow:none;
  color:var(--ink);
  text-align:center;
  font-family:Georgia, "Times New Roman", serif;
  font-size:13px;
}

.index-page .example-question > em{
  display:inline-block;
  opacity:0;
  user-select:text;
  -webkit-user-select:text;
}

.index-page .example-happiness{
  --bubble-ratio:446 / 411;
  --bubble-padding:clamp(10px, 4vw, 18px) clamp(14px, 5vw, 22px) clamp(28px, 9vw, 50px);
  background-image:url("2/bubble1_text.png");
}

.index-page .example-negative{
  --bubble-ratio:431 / 471;
  --bubble-padding:clamp(10px, 4vw, 18px) clamp(14px, 5vw, 22px) clamp(38px, 12vw, 70px);
  background-image:url("2/bubble5_text.png");
  background-size:95% auto;
}

.index-page .example-positive{
  --bubble-ratio:466 / 398;
  --bubble-padding:clamp(10px, 4vw, 18px) clamp(14px, 5vw, 22px) clamp(24px, 8vw, 42px);
  background-image:url("2/bubble3_text.png");
}

@media (min-width:621px){
  .index-page .example-questions{
    display:grid;
    grid-template-columns:repeat(2, 175px);
    grid-template-rows:130px 130px;
    grid-template-areas:
      "happy negative"
      "positive negative";
    justify-content:center;
    column-gap:clamp(20px, 4vw, 38px);
    row-gap:0;
    padding:0;
  }

  .index-page .example-happiness{
    grid-area:happy;
    align-self:end;
    transform:translateX(24px);
  }

  .index-page .example-negative{
    grid-area:negative;
    align-self:center;
    transform:translate(-8px, -14px);
  }

  .index-page .example-positive{
    grid-area:positive;
    align-self:start;
    transform:translate(-68px, -38px);
  }

  .index-page .example-happiness > em{
    transform:rotate(2deg);
  }

  .index-page .example-negative > em{
    transform:rotate(-1.5deg);
  }

  .index-page .example-positive > em{
    transform:rotate(1deg);
  }
}

.index-page .example-happiness > em{
  position:relative;
  top:-1.5em;
}

.index-page .example-negative > em{
  position:relative;
  top:-1em;
}

@media (min-width:621px){
  .index-page .example-negative > em{
    top:-.5em;
  }
}

.index-page .example-happiness strong{
  color:var(--ink);
  font-weight:700;
}

.index-page .example-negative strong:first-of-type{
  color:#B4493F;
}

.index-page .example-negative strong:last-of-type{
  color:#754E91;
}

.index-page .example-positive strong:first-of-type{
  color:#6f9427;
}

.index-page .example-positive strong:last-of-type{
  color:#D47A32;
}

@media (max-width:620px){
  body.task-one-body::before,
  body.emotion-task-body::before,
  body.index-body::before,
  body.task-one-done-body::before,
  body.task-two-done-body::before{
    position:absolute;
  }

  .index-page .example-questions{
    flex-wrap:wrap;
  }

  .index-page .example-question{
    flex-basis:45%;
  }
}

@media (min-width:561px) and (max-width:620px){
  .index-page .example-questions{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 175px));
    justify-content:center;
    gap:14px;
  }

  .index-page .example-positive{
    grid-column:1 / -1;
    width:50%;
    min-width:150px;
    justify-self:center;
  }
}

.index-page h1{
  font-size:clamp(22px, calc(3vw - 2px), 26px);
}

.index-page h2{
  font-size:18px;
}

.index-page .next-step h2{
  font-size:18px;
}

.index-page .task-description{
  margin:0 0 18px;
  padding:8px 0 8px 16px;
  border-left:3px solid var(--line);
  display:grid;
  grid-template-columns:minmax(0, 1fr) 150px;
  gap:18px;
  align-items:center;
}

.index-page .task-description :is(h2, h4){
  margin:0 0 4px;
  font-size:15px;
  font-family: Georgia, serif;
}

.index-page .task-description p{
  margin:0;
  font-size:15px;
}

@media (min-width:621px){
  .index-page .task-description{
    grid-template-columns:70px minmax(0, 1fr);
    column-gap:2px;
    padding:8px 0;
    border-left:0;
  }

  .index-page .task-description-copy{
    grid-column:2;
    grid-row:1;
    padding-left:14px;
    border-left:3px solid var(--line);
  }

  .index-page .task-description .task-preview{
    grid-column:1;
    grid-row:1;
    width:82px;
    margin-left:0;
    align-self:center;
    justify-self:start;
    transform:scale(.8);
    transform-origin:left center;
  }

  .index-page .task-description .sentiment-tile-grid{
    margin-left:auto;
    margin-right:auto;
  }
}

.task-preview{ width:80%; margin:0; }

.sentiment-tile-grid{
  width:64px;
  aspect-ratio:1;
  margin:0 auto;
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:5px;
}

.sentiment-tile{
  display:block;
  border:1px solid rgba(31,30,26,.2);
  border-radius:7px;
  box-shadow:0 2px 5px rgba(31,30,26,.1);
}

.sentiment-tile-ink{ background:var(--ink); }
.sentiment-tile-green{ background:var(--positive); }
.sentiment-tile-neutral,
.sentiment-tile-neutral-alt{
  background-color:var(--card);
  background-image:repeating-linear-gradient(
    132deg,
    transparent 0 4px,
    rgba(31,30,26,.28) 4px 6px,
    transparent 6px 9px,
    rgba(31,30,26,.2) 9px 11px
  );
}

.sentiment-scale{
  position:relative;
  height:8px;
  margin:18px 12px 8px;
  border-radius:999px;
  background:linear-gradient(90deg, rgba(31,30,26,.78), var(--line) 50%, rgba(137,182,36,.9));
}

.sentiment-marker{
  position:absolute;
  top:50%;
  width:17px;
  height:30px;
  display:grid;
  place-items:center;
  border:2px solid var(--paper);
  border-radius:50%;
  color:#fff;
  font-size:19px;
  font-weight:700;
  line-height:0.8;
  transform:translate(-50%, -50%);
  box-shadow:0 2px 6px rgba(31,30,26,.18);
}

.sentiment-marker-negative{ left:18%; background:var(--negative);padding-bottom: 1px }
.sentiment-marker-positive{ left:82%; background:var(--positive);padding-bottom: 1px }

.sentiment-preview figcaption{
  display:flex;
  justify-content:space-between;
  color:var(--ink-muted);
  font-size:12px;
}

.preview-petals{ position:relative; width:82px; height:82px; margin:0 auto; }

.preview-petals span{
  position:absolute;
  left:50%;
  top:50%;
  width:20px;
  height:44px;
  overflow:hidden;
  isolation:isolate;
  opacity:.68;
  border:1.5px solid rgba(31,30,26,.34);
  border-radius:78% 69% 46% 53% / 73% 79% 44% 51%;
  box-shadow:
    inset 1px 0 rgba(31,30,26,.13),
    inset -1px 1px rgba(255,255,255,.16);
  transform-origin:50% 100%;
  transform:translate(-50%, -100%) rotate(calc(var(--leaf-index) * 45deg)) translateY(5px);
}

.preview-petals span::before{
  content:"";
  position:absolute;
  inset:-55%;
  z-index:1;
  background:repeating-linear-gradient(
    132deg,
    transparent 0 4px,
    rgba(31,30,26,.28) 4px 6px,
    transparent 6px 9px,
    rgba(31,30,26,.2) 9px 11px
  );
  transform:rotate(calc(var(--leaf-index) * -45deg));
  transform-origin:center;
}

.preview-petals span:nth-child(even){
  border-radius:69% 81% 52% 44% / 80% 70% 50% 45%;
}

.preview-petals span:nth-child(3n){
  border-width:1px 2px 1.5px 1px;
}

.preview-petals span:nth-child(1){ background-color:#e5d21a; }
.preview-petals span:nth-child(2){ background-color:#a8c94a; }
.preview-petals span:nth-child(3){ background-color:#457023; }
.preview-petals span:nth-child(4){ background-color:#67bdd0; }
.preview-petals span:nth-child(5){ background-color:#427bb7; }
.preview-petals span:nth-child(6){ background-color:#754e91; }
.preview-petals span:nth-child(7){ background-color:#b4493f; }
.preview-petals span:nth-child(8){ background-color:#d47a32; }

.preview-petals i{
  position:absolute;
  left:50%;
  top:50%;
  width:18px;
  height:18px;
  border-radius:50%;
  background-color:var(--card);
  background-image:repeating-linear-gradient(
    132deg,
    transparent 0 4px,
    rgba(31,30,26,.28) 4px 6px,
    transparent 6px 9px,
    rgba(31,30,26,.2) 9px 11px
  );
  transform:translate(-50%, -50%);
}

@media (max-width:560px){
  .index-page .task-description{
    grid-template-columns:70px minmax(0, 1fr);
    column-gap:14px;
    padding:8px 0;
    border-left:0;
    align-items:center;
  }

  .index-page .task-description .task-preview{
    grid-column:1;
    grid-row:1;
    width:82px;
    max-width:82px;
    margin:0 0 0 -12px;
    justify-self:start;
    align-self:center;
  }

  .index-page .task-description-copy{
    grid-column:2;
    grid-row:1;
    min-width:0;
    padding-left:16px;
    border-left:3px solid var(--line);
  }
}




#choices-card{
  text-align:left;
  max-width:450px;
  width:100%;
  margin-top:20px;
  padding:18px;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:var(--card);
  box-shadow: var(--shadow-soft);
}

.choices-table{
  width:100%;
  max-width:100%;
  border-collapse:collapse;
  table-layout:fixed;
}

.choices-table th,
.choices-table td{
  padding:8px 10px;
  vertical-align:top;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:normal;
}

.choices-table .positive-col{
  width:45%;
  text-align:right;
  padding-right:10px;
}

.choices-table .arrow-col{
  width:10%;
  text-align:center;
  color:var(--ink-faint);
  white-space:nowrap;
}

.choices-table .negative-col{
  width:45%;
  text-align:left;
  padding-left:10px;
}

.choices-table thead th{
  font-size:13px;
  color:var(--ink-muted);
  font-weight:700;
}


.check{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin:18px 0;
  color:var(--ink);
  line-height:1.5;
}

.check input[type="checkbox"]{
  width:auto;
  height:auto;
  margin:0.25em 0 0;
  padding:0;
  flex:0 0 auto;
}

.check span{
  display:block;
  flex:1;
}


.notice{
  padding: .75rem 1rem;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  margin-bottom: 1rem;
  color: var(--accent);
}

a.export{
  display:block;
  padding:16px 18px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--card);
  color:var(--ink);
  text-decoration:none;
  font-weight:700;
  box-shadow: var(--shadow-soft);
}

a.export:hover{
  border-color:var(--accent);
  background:var(--card-soft);
}

.desc{
  display:block;
  margin-top:4px;
  color:var(--ink-muted);
  font-weight:400;
  font-size:12px;
}


.research-footer{
  display:grid;
  grid-template-columns:minmax(180px, 1fr) minmax(340px, 420px);
  align-items:center;
  gap:20px;
  margin-top:20px;
  padding-top:8px;
}


.contact{
  text-align:left;
  color:var(--ink);
  min-width:180px;
}

.contact h3{
  color:var(--ink);
  font-size:14px;
}

.contact p{
  margin:0;
  color:var(--ink);
  line-height:1.5;
  font-size:12px;
}

.research-brand{
  display:grid;
  grid-template-columns:minmax(120px, 150px) minmax(180px, 260px);
  align-items:center;
  align-self:start;
  gap:12px;
  width:min(100%, 420px);
  min-width:min(100%, 340px);
  justify-self:end;
}

/* Stack before either footer column reaches its readable minimum width.
   Browser zoom reduces the CSS viewport and therefore triggers this too. */
@media (max-width:1250px){
  :is(.index-page, .emotion-done-page) .research-footer{
    grid-template-columns:minmax(0, 1fr);
    align-items:start;
  }

  :is(.index-page, .emotion-done-page) .contact,
  :is(.index-page, .emotion-done-page) .research-brand{
    width:100%;
    min-width:0;
    justify-self:start;
  }

  :is(.index-page, .emotion-done-page) .research-brand{
    grid-template-columns:minmax(0, 1fr);
    justify-items:start;
    margin-top:10px;
  }

  :is(.index-page, .emotion-done-page) .research-brand p{
    width:100%;
    max-width:100%;
    overflow-wrap:anywhere;
    word-break:break-word;
  }
}

@media (min-width:561px){
  :is(.index-page, .emotion-done-page) .research-brand{
    margin-top:27px;
  }
}

@media (min-width:561px) and (max-width:1250px){
  :is(.index-page, .emotion-done-page) .research-brand{
    margin-top:10px;
  }
}

:is(.index-page, .emotion-done-page) .research-brand p{
  max-width:260px;
  margin:0;
  color:var(--ink-muted);
  font-size:10px;
  line-height:1.35;
  text-align:left;
}

@media (max-width:1250px){
  :is(.index-page, .emotion-done-page) .research-brand p{
    max-width:100%;
  }
}

:is(.index-page, .emotion-done-page) .research-brand p a{
  color:var(--ink-muted);
}

.research-logo{
  width:90px;
  height:auto;
  max-height:44px;
  object-fit:contain;
  display:block;
}



/* ---------- breathing room ---------- */

p{
  text-align:left;
  margin-top:0;
  margin-bottom:1rem;
}

h1{
  margin-bottom:20px;
}

h2{
  margin-top:34px;
  margin-bottom:14px;
}

h3{
  margin-top:0;
  margin-bottom:8px;
}

form{
  margin-top:28px;
}

.start-task-form{
  display:flex;
  justify-content:center;
}

label{
  display:block;
  margin-top:18px;
  margin-bottom:8px;
  font-weight:700;
}

input,
select,
textarea{
  margin-bottom:14px;
}

button,
.btn{
  margin-top:4px;
}

.actions{
  width:100%;
  max-width:420px;
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
  margin:28px auto 30px;
}

.emotion-done-page .actions{
  width:55%;
  max-width:none;
  grid-template-columns:1fr;
  gap:14px;
  margin:0 0 30px;
}

.emotion-done-page .actions a{
  color:var(--ink);
}

.emotion-done-page .share-prompt{
  margin-bottom:0;
}

.emotion-done-page .actions > .btn{
  width:calc(100% - 27px);
  justify-self:start;
}

@media (max-width:620px){
  .emotion-done-page .actions{
    width:100%;
    grid-template-columns:1fr;
  }

  .emotion-done-page .actions > .btn{
    width:100%;
  }
}

.done-page #share-experiment{
  width:100%;
  margin:0 0 24px;
}

.actions form,
.actions .btn,
.actions button{
  width:100%;
  margin:0;
}

.actions .btn{
  display:flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  text-align:center;
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:3px;
}

.actions .btn-ghost{
  justify-content:flex-start;
  text-align:left;
}

.notice{
  margin-bottom:20px;
}

.rule{
  padding:18px 0;
}

.small{
  margin-top:24px;
}

.choice-step{
  margin-bottom:22px;
}

.set-card{
  margin-top:18px;
}

.cue-grid{
  gap:18px;
  padding:24px;
}

.cue-button{
  padding:22px 18px;
}

.hint{
  margin-top:20px;
}


select,
input[type="text"],
input[list]{
  width:80%;
  max-width:80%;
  display:block;
}

form select{
  width:100%;
  min-height:44px;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--card);
  color:var(--ink);
  font:inherit;
}

.index-page .optional-name-input{
  width:min(100%, 22rem);
  max-width:100%;
  min-height:40px;
  padding:9px 12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--card);
  color:var(--ink);
  font:inherit;
}


.emotion-list{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-top:26px;
}

.emotion-item{
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(180px, 240px);
  align-items:center;
  gap:14px;
  padding:14px 16px;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:12px;
  box-shadow:var(--shadow-soft);
}

.emotion-word{
  font-weight:700;
  color:var(--ink);
  overflow-wrap:anywhere;
}

.emotion-pos{
  display:inline-block;
  margin-left:8px;
  font-size:12px;
  font-weight:600;
  color:var(--ink-faint);
  text-transform:uppercase;
}

.emotion-item select{
  width:100%;
  min-height:44px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:white;
  color:var(--ink);
  font:inherit;
}

.emotion-page{
  max-width:760px;
}

.emotion-target-word{
  margin:22px 0 18px;
  padding:22px 24px;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow-soft);
  font-family:Georgia, "Times New Roman", serif;
  font-size:clamp(30px, 7vw, 40px);
  line-height:1.1;
  color:var(--ink);
  text-align:center;
}

.emotion-rating-list{
  display:flex;
  flex-direction:column;
  gap:16px;
  margin-top:28px;
}

.emotion-rating-row{
  padding:18px;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:14px;
  box-shadow:var(--shadow-soft);
}

.emotion-rating-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}

.emotion-rating-header h2{
  margin:0;
  font-size:22px;
  line-height:1.2;
  color:var(--ink);
}

.cannot-judge{
  display:flex;
  align-items:flex-start;
  gap:8px;
  margin:0;
  font-size:14px;
  line-height:1.35;
  color:var(--ink-muted);
  font-weight:600;
  max-width:220px;
}

.cannot-judge input[type="checkbox"]{
  width:auto;
  height:auto;
  margin:0.15em 0 0;
  padding:0;
  flex:0 0 auto;
}

.emotion-word-unknown{
  max-width:none;
  margin:22px 0 0;
  align-items:center;
}

.emotion-pos{
  display:inline-block;
  margin-left:8px;
  font-size:14px;
  color:var(--ink-faint);
  text-transform:uppercase;
  font-weight:600;
  font-family:system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.emotion-pos-label{
  display:inline-block;
  margin-left:3px;
  color:var(--ink);
  font-family:system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size:.68em;
  font-style:italic;
  font-weight:400;
  text-transform:none;
  vertical-align:sub;
  position: relative;
    top: -0.1em;
}

.emotion-actions{
  max-width:420px;
  margin:30px auto 0;
}

.emotion-actions button{
  width:100%;
}


/* ---------- mobile index readability ---------- */
@media (max-width: 560px){
  html{
    font-size:16px;
  }

  body{
    width:100%;
    min-height:100vh;
    padding:24px 16px 40px;
    align-items:stretch;
  }
  .emotion-item{
    grid-template-columns:1fr;
    align-items:start;
  }

    .emotion-page{
      max-width:none;
    }

    .emotion-rating-row{
      padding:16px;
    }

    .emotion-rating-header{
      flex-direction:column;
      gap:10px;
    }

    .cannot-judge{
      max-width:none;
    }

    .emotion-scale-labels{
      font-size:11px;
      gap:4px;
    }

  .card,
  .wrap,
  main{
    width:100%;
    max-width:none;
  }

  main.card,
  main.wrap{
    padding:0;
  }

  h1{
    font-size:clamp(1.4rem, 7vw, 1.5rem);
    line-height:1.12;
  }

  h2{
    font-size:clamp(1.1rem, 5.5vw, 1.25rem);
  }

  p,
  label,
  input,
  select,
  textarea,
  button,
  .btn{
    font-size:clamp(1rem, 4.5vw, 1.125rem);
  }

  small,
  .next-step p,
  :is(.done-page, .emotion-done-page) .next-step p{
    font-size:1rem;
  }

  p{
    line-height:1.6;
  }

  input,
  select,
  textarea,
  button,
  .btn{
    min-height:54px;
    max-width:100%;
    padding:clamp(10px, 3.5vw, 14px) clamp(12px, 4vw, 16px);
  }

  form{
    width:100%;
  }
}

/* Index-page phone layout. Keep this after the shared mobile rules so it wins. */
@media (max-width:560px){
  html{
    --mobile-display-scale:1.12;
  }

  html[data-display-size="large"]{
    --mobile-display-scale:1.25;
  }

  body.index-body{
    padding:12px 8px 28px;
    background-attachment:scroll;
  }

  .index-page .display-size-control{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:8px;
    margin:0 0 8px;
    color:#fff;
    font-size:12px;
  }

  .index-page .display-size-control button{
    width:auto;
    min-width:44px;
    min-height:44px;
    padding:4px 7px;
    border:1px solid rgba(255,255,255,.7);
    border-radius:8px;
    background:rgba(255,255,255,.9);
    color:var(--ink);
    font-size:13px;
    line-height:1;
  }

  .index-page .display-size-control button[aria-pressed="true"]{
    border-color:var(--positive);
    background:var(--positive-hover);
    box-shadow:0 0 0 2px rgba(137,182,36,.35);
    font-weight:700;
  }

  .index-page .text-card{
    padding:16px 20px;
  }

  .index-page p,
  .index-page label,
  .index-page input,
  .index-page select,
  .index-page textarea,
  .index-page button{
    font-size:calc(17px * var(--mobile-display-scale));
  }

  .index-page h1{
    font-size:calc(24px * var(--mobile-display-scale));
  }

  .index-page h2{
    font-size:calc(20px * var(--mobile-display-scale));
  }

  .index-page .task-description :is(h2, h4){
    font-size:calc(15px * var(--mobile-display-scale));
  }

  .index-page .example-questions{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:0;
    margin:10px 0 14px;
  }

  .index-page .example-question{
    width:100%;
    max-width:100%;
    min-height:0;
    padding:var(--bubble-padding);
    font-size:calc(13px * var(--mobile-display-scale));
  }

  .index-page .example-happiness{
    justify-self:end;
    transform:translateY(-5px);
  }

  .index-page .example-negative{
    justify-self:start;
    transform:translateY(20px);
  }

  .index-page .example-positive{
    grid-column:1 / -1;
    width:50%;
    justify-self:center;
    transform:translate(-40%, -12px);
  }

  .index-page .example-happiness > em{
    transform:rotate(1deg);
  }

  .index-page .example-negative > em{
    transform:rotate(-1deg);
  }

  .index-page .example-positive > em{
    transform:rotate(.5deg);
  }

  html:is([data-display-size="normal"], [data-display-size="large"])
  .index-page .example-questions{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  html[data-display-size="normal"]
  .index-page .example-question{
    width:100%;
    max-width:200px;
  }

  html[data-display-size="normal"]
  .index-page .example-happiness,
  html[data-display-size="normal"]
  .index-page .example-positive{
    background-size:contain;
  }

  html[data-display-size="normal"]
  .index-page .example-negative{
    background-size:95% auto;
  }

  html[data-display-size="large"]
  .index-page .example-question{
    width:110%;
    max-width:225px;
  }

  html[data-display-size="large"]
  .index-page .example-negative{
    background-size:95% auto;
    background-position:center calc(50% + 4px);
  }

  html[data-display-size="large"]
  .index-page .example-negative > em{
    max-width:90%;
  }

  html:is([data-display-size="normal"], [data-display-size="large"])
  .index-page .example-happiness{
    justify-self:end;
  }

  html:is([data-display-size="normal"], [data-display-size="large"])
  .index-page .example-negative{
    justify-self:start;
  }

  html:is([data-display-size="normal"], [data-display-size="large"])
  .index-page .example-positive{
    grid-column:1 / -1;
    width:50%;
    justify-self:center;
  }

  html[data-display-size="large"] .index-page .example-positive{
    width:55%;
  }

  .index-page .task-description{
    grid-template-columns:1fr;
    gap:8px;
    padding:10px 8px 10px 12px;
  }

  .index-page .task-preview{
    width:min(100%, 220px);
    justify-self:center;
  }

  .index-page input,
  .index-page select,
  .index-page textarea,
  .index-page button{
    width:100%;
    max-width:100%;
  }

  .index-page .check input[type="checkbox"]{
    width:auto;
    min-height:0;
    padding:0;
  }

  :is(.index-page, .emotion-done-page) .research-footer{
    grid-template-columns:1fr;
    text-align:left;
  }

  :is(.index-page, .emotion-done-page) .contact{
    width:100%;
    justify-self:start;
    text-align:left;
  }

  :is(.index-page, .emotion-done-page) .research-brand{
    grid-template-columns:1fr;
    justify-items:start;
    width:100%;
    margin-top:10px;
    justify-self:start;
  }

  :is(.index-page, .emotion-done-page) .research-brand p{
    max-width:320px;
    font-size:calc(10px * var(--mobile-display-scale));
  }
}

.emotion-word-with-pos{
  white-space:nowrap;
}

/* Persistent mobile display-size control shared by participant-facing pages. */
@media (max-width:620px){
  html{
    --mobile-display-scale:1.12;
  }

  html[data-display-size="large"]{
    --mobile-display-scale:1.25;
  }

  body:is(
    .index-body,
    .task-one-body,
    .emotion-task-body,
    .task-one-done-body,
    .task-two-done-body
  ){
    padding-top:68px;
    padding-right:12px;
    padding-left:12px;
    font-size:calc(17px * var(--mobile-display-scale));
  }

  body:is(
    .index-body,
    .task-one-body,
    .emotion-task-body,
    .task-one-done-body,
    .task-two-done-body
  ) :is(.text-card, .next-step){
    width:100%;
    padding:16px 20px;
    box-sizing:border-box;
  }

  body :is(.index-page, .emotion-page, .wrap) .progress-label,
  body :is(.done-page, .emotion-done-page) .step-complete{
    min-height:20px;
    margin-top:0;
    margin-bottom:12px;
    line-height:20px;
    font-size:calc(12px * var(--mobile-display-scale));
  }

  body.task-one-body::before,
  body.emotion-task-body::before,
  body.index-body::before,
  body.task-one-done-body::before,
  body.task-two-done-body::before{
    position:fixed;
    background-color:#151515;
    background-position:center, center;
    background-size:100% 100%, auto 100%;
    background-repeat:no-repeat;
  }

  .display-size-control{
    position:fixed;
    top:max(8px, env(safe-area-inset-top));
    right:max(8px, env(safe-area-inset-right));
    z-index:1000;
    display:flex;
    align-items:center;
    gap:8px;
    padding:5px 7px;
    border:1px solid rgba(255,255,255,.55);
    border-radius:10px;
    background:rgba(31,30,26,.88);
    box-shadow:0 3px 12px rgba(0,0,0,.22);
    color:#fff;
    font-size:12px;
    backdrop-filter:blur(5px);
  }

  .display-size-control button{
    width:auto;
    min-width:44px;
    min-height:44px;
    margin:0;
    padding:4px 7px;
    border:1px solid rgba(255,255,255,.7);
    border-radius:8px;
    background:rgba(255,255,255,.94);
    color:var(--ink);
    font-size:13px;
    line-height:1;
  }

  .display-size-control button[aria-pressed="true"]{
    border-color:var(--positive);
    background:var(--positive-hover);
    box-shadow:0 0 0 2px rgba(137,182,36,.35);
    font-weight:700;
  }

  body :is(p, label, input, select, textarea, button, .btn){
    font-size:calc(17px * var(--mobile-display-scale));
  }

  body h1{
    font-size:calc(24px * var(--mobile-display-scale));
  }

  body h2{
    font-size:calc(20px * var(--mobile-display-scale)) !important;
  }

  body h3{
    font-size:calc(18px * var(--mobile-display-scale));
  }

  body h4{
    font-size:calc(17px * var(--mobile-display-scale));
  }

  .index-page .task-description :is(h2, h4){
    font-size:calc(15px * var(--mobile-display-scale)) !important;
  }

  .emotion-done-page .task-choice-row .task-description-copy > h2{
    font-size:calc(15px * var(--mobile-display-scale)) !important;
  }

  .index-page .task-description p{
    font-size:calc(16px * var(--mobile-display-scale));
  }

  body .note small{
    font-size:calc(15px * var(--mobile-display-scale));
    line-height:1.5;
  }

  body small{
    font-size:calc(15px * var(--mobile-display-scale));
  }

  body .progress-label,
  body .step-complete{
    font-size:calc(12px * var(--mobile-display-scale));
  }

  body .meaning-hint,
  body .desc,
  body .contact p{
    font-size:calc(12px * var(--mobile-display-scale));
  }

  body :is(#emotion-done-step-one-description, #emotion-done-step-two-description){
    font-size:calc(16px * var(--mobile-display-scale));
  }

  body .contact h3{
    font-size:calc(14px * var(--mobile-display-scale));
  }

  body .discard-comment-panel label,
  body .choices-table thead th{
    font-size:calc(13px * var(--mobile-display-scale));
  }

  body :is(.share-status, .cannot-judge){
    font-size:calc(14px * var(--mobile-display-scale));
  }

  body .emotion-pos{
    font-size:calc(12px * var(--mobile-display-scale));
  }

  body :is(button, .btn){
    font-size:calc(17px * var(--mobile-display-scale)) !important;
  }

  .task-one-body .choice-title,
  .emotion-page .meaning-question-title{
    font-size:calc(20px * var(--mobile-display-scale));
  }

  .emotion-page .emotion-rating-header h2{
    font-size:calc(18px * var(--mobile-display-scale));
  }

  .display-size-control,
  .display-size-control button{
    font-size:13px !important;
  }
}

.index-page :is(#age_range, #native_language, .optional-name-input){
  width:min(100%, 18rem);
  max-width:100%;
}

.index-page form > button[type="submit"]{
  width:min(100%, 18rem);
  max-width:100%;
  padding:17px 20px;
}

.index-page .check input[type="checkbox"]{
  transform:translateX(6px);
}

.index-page .check{
  gap:18px;
}

.index-page .info ~ form{
  margin-top:14px;
}

.index-page form > .field:first-of-type > label{
  margin-top:8px;
}

/* Keep the example bubbles in normal flow so they cannot cover the copy above. */
.index-page .example-questions{
  position:relative;
  clear:both;
  width:100%;
  max-width:100%;
  margin-top:clamp(22px, 3vw, 34px);
}

.index-page .example-happiness,
.index-page .example-negative,
.index-page .example-positive{
  transform:none;
}

.index-page .example-questions-joint{
  display:none;
}

@media (min-width:621px){
  .index-page .example-questions{
    display:block;
    padding:0;
    margin-top:10px;
    margin-bottom:clamp(24px, 3vw, 36px);
  }

  .index-page .example-question{
    display:none;
  }

  .index-page .example-questions-joint{
    display:block;
    width:85%;
    height:auto;
    max-width:720px;
    margin-inline:auto;
    transition:width 160ms ease, max-width 160ms ease;
  }

  html[data-display-size="large"] .index-page .example-questions-joint{
    width:95%;
    max-width:800px;
  }
}
