body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #eef3f0;
  color: #1f2a24;
}

.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 24px;
}

.hero {
  text-align: center;
}

.hero h1 {
  font-size: 56px;
  margin: 0;
}

.hero p {
  font-size: 20px;
  margin-top: 10px;
  color: #5a6b63;
}

.card {
  background: white;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  text-align: center;
  max-width: 420px;
  width: 100%;
}

.card h2 {
  margin-top: 0;
}

button,
.button {
  display: inline-block;
  border: none;
  text-decoration: none;
  background: #2f7d5c;
  color: white;
  padding: 16px 28px;
  border-radius: 12px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 20px;
}

button:hover,
.button:hover {
  background: #276a4e;
}

.small-button {
  margin-top: 0;
  padding: 12px 18px;
  font-size: 14px;
}

.form-card {
  display: flex;
  flex-direction: column;
  gap: 22px;
  text-align: left;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
}

input,
select {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #d7ded9;
  font-size: 16px;
}

.planner-page {
  min-height: 100vh;
  padding: 32px;
}

.planner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  gap: 20px;
}

.planner-header h1 {
  font-size: 42px;
  margin: 0;
}

.planner-header p {
  font-size: 18px;
  margin: 8px 0 0;
  color: #5a6b63;
}

.planner-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 14px;
  width: 100%;
}

.day {
  background: white;
  min-height: 520px;
  padding: 14px;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  cursor: pointer;
}

.day:hover {
  outline: 2px solid #c8ded2;
}

.day-title {
  background: #e8f3ee;
  color: #1f2a24;
  padding: 12px;
  border-radius: 12px;
  text-align: center;
  font-weight: 800;
  margin-bottom: 14px;
}

.task-card {
  background: #ffffff;
  border: 1px solid #dfe8e3;
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 12px;
  text-align: center;
  box-shadow: 0 5px 14px rgba(0,0,0,0.04);
}

.task-image {
  background: #f4f8f6;
  border-radius: 14px;
  font-size: 44px;
  line-height: 1;
  padding: 18px 8px;
  margin-bottom: 10px;
}

.task-name {
  font-size: 14px;
  font-weight: 700;
}

.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 42, 36, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.popup-overlay.show {
  display: flex;
}

.popup-card {
  background: white;
  width: 100%;
  max-width: 720px;
  max-height: 82vh;
  overflow: auto;
  padding: 32px;
  border-radius: 24px;
  box-shadow: 0 16px 50px rgba(0,0,0,0.18);
  text-align: center;
}

.popup-card h2 {
  margin-top: 0;
  font-size: 30px;
}

.popup-card p {
  color: #5a6b63;
  margin-bottom: 24px;
}

.task-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.task-button {
  background: #f4f8f6;
  color: #1f2a24;
  margin: 0;
  padding: 16px;
  border-radius: 18px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  min-height: 120px;
}

.task-button:hover {
  background: #e8f3ee;
}

.task-button-icon {
  font-size: 34px;
}

.task-button-text {
  font-size: 15px;
  font-weight: 800;
}

.task-button-category {
  font-size: 12px;
  color: #6a7a72;
  font-weight: 500;
}

.secondary-button {
  background: #eef3f0;
  color: #1f2a24;
  margin-top: 24px;
}

.secondary-button:hover {
  background: #dce6e1;
}

@media (max-width: 1000px) {
  .planner-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .task-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.repeat-card {
  max-width: 560px;
}

.repeat-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.repeat-options button {
  background: #e8f3ee;
  color: #1f2a24;
  margin: 0;
  padding: 18px;
  border-radius: 16px;
  font-weight: 800;
}

.repeat-options button:hover {
  background: #d7ebe1;
}

#repeat-task-name {
  font-size: 24px;
  font-weight: 800;
  color: #1f2a24;
}

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

.grid-header {
  font-weight: bold;
  text-align: center;
  padding: 10px;
}

.time-label {
  font-weight: bold;
  display: flex;
  align-items: center;
}

.cell {
  background: white;
  border: 1px dashed #ccc;
  min-height: 100px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.week-grid {
  display: grid;
  grid-template-columns: 110px repeat(7, 1fr);
  gap: 8px;
  width: 100%;
}

.corner-cell {
  min-height: 44px;
}

.week-day-header {
  background: #e8f3ee;
  color: #1f2a24;
  border-radius: 12px;
  padding: 12px 6px;
  text-align: center;
  font-weight: 900;
}

.time-cell {
  background: #f4f8f6;
  border-radius: 12px;
  padding: 12px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 145px;
}

.plan-cell {
  background: white;
  border: 2px dashed #d9e6df;
  border-radius: 14px;
  min-height: 145px;
  padding: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-cell:hover {
  border-color: #2f7d5c;
  background: #fbfdfc;
}

.plus {
  margin: auto;
  font-size: 24px;
  color: #8aa196;
  font-weight: 700;
}

.plan-cell .task-card {
  margin-bottom: 0;
}

.plan-cell .task-image {
  font-size: 32px;
  padding: 10px 4px;
}

.plan-cell .task-name {
  font-size: 12px;
}

@media (max-width: 1100px) {
  .week-grid {
    grid-template-columns: 90px repeat(7, minmax(120px, 1fr));
    overflow-x: auto;
  }
}

.settings-panel {
  background: white;
  padding: 18px;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  display: flex;
  gap: 16px;
  align-items: end;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.settings-panel label {
  min-width: 220px;
}

.helper-text {
  color: #6a7a72;
  margin: 0 0 18px;
  font-size: 14px;
}

.row-input {
  flex: 1;
  min-height: 20px;
}

.delete-row {
  cursor: pointer;
  margin-left: 6px;
  font-size: 14px;
}

.add-row {
  cursor: pointer;
  font-size: 28px;
  justify-content: center;
}

.empty-cell {
  visibility: hidden;
}

.editable-row-cell {
  gap: 6px;
}

.row-input {
  flex: 1;
  min-height: 22px;
  outline: none;
  cursor: text;
}

.row-input:empty::before {
  content: attr(data-placeholder);
  color: #9aa9a1;
  font-weight: 500;
}

.delete-row {
  border: none;
  background: transparent;
  cursor: pointer;
  margin: 0;
  padding: 4px;
  font-size: 14px;
}

.delete-row:hover {
  background: #f1e6e6;
}

.add-row-cell {
  cursor: pointer;
  font-size: 30px;
  font-weight: 900;
  color: #2f7d5c;
  justify-content: center;
}

.empty-cell {
  visibility: hidden;
}

.task-image img {
  max-width: 54px;
  max-height: 54px;
  object-fit: contain;
}

.emoji-fallback {
  font-size: 32px;
}

.image-style-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.image-style-button {
  background: #f4f8f6;
  color: #1f2a24;
  margin: 0;
  padding: 12px;
  border-radius: 16px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 150px;
}

.image-style-button:hover {
  background: #e8f3ee;
}

.image-style-button.selected {
  outline: 3px solid #2f7d5c;
  background: #e8f3ee;
}

.image-style-preview {
  width: 70px;
  height: 70px;
  background: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-style-preview img {
  max-width: 64px;
  max-height: 64px;
  object-fit: contain;
}

.image-style-title {
  font-size: 14px;
  font-weight: 900;
}

.image-style-description {
  font-size: 11px;
  color: #6a7a72;
  font-weight: 500;
}

.task-card {
  cursor: pointer;
}

@media (max-width: 900px) {
  .image-style-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.task-card {
  position: relative;
}

.delete-task {
  position: absolute;
  top: 4px;
  right: 4px;
  border: none;
  background: rgba(255,255,255,0.9);
  color: #7b2d2d;
  border-radius: 999px;
  width: 22px;
  height: 22px;
  padding: 0;
  margin: 0;
  font-size: 16px;
  line-height: 20px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.delete-task:hover {
  background: #ffe5e5;
}

.single-task-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.plan-cell .task-image {
  flex: 1;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.plan-cell .task-image img {
  max-width: 110px;
  max-height: 92px;
  object-fit: contain;
}

.plan-cell .emoji-fallback {
  font-size: 54px;
}

.plan-cell .task-name {
  font-size: 14px;
  margin-top: 6px;
}

.small-delete-task {
  position: absolute;
  top: 6px;
  right: 6px;

  width: 20px;
  height: 20px;

  border-radius: 50%;
  border: none;

  background: rgba(0,0,0,0.55);
  color: white;

  font-size: 12px;
  line-height: 20px;
  text-align: center;

  cursor: pointer;

  opacity: 0;
  transition: all 0.2s ease;
}

.small-delete-task:hover {
  background: #ffe5e5;
}

.task-card:hover .small-delete-task {
  opacity: 1;
}

.task-card .delete-task,
.task-card .small-delete-task {
  position: absolute !important;
  top: 6px !important;
  right: 6px !important;

  width: 22px !important;
  height: 22px !important;

  min-width: 0 !important;
  min-height: 0 !important;

  padding: 0 !important;
  margin: 0 !important;

  border: none !important;
  border-radius: 50% !important;

  background: rgba(0, 0, 0, 0.55) !important;
  color: white !important;

  font-size: 13px !important;
  line-height: 22px !important;
  text-align: center !important;

  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
  box-shadow: none !important;
}

.task-card:hover .delete-task,
.task-card:hover .small-delete-task {
  opacity: 1;
}

.task-card {
  position: relative;
}

.edit-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  font-weight: 700;
  margin: 16px 0;
}

#custom-task-text {
  width: 100%;
  resize: vertical;
  border: 1px solid #cfe0d8;
  border-radius: 12px;
  padding: 12px;
  font-family: Arial, sans-serif;
  font-size: 15px;
}

/* FIX: bilde skal ikke krympe når teksten blir lang */
.single-task-card {
  display: grid;
  grid-template-rows: 1fr auto;
  height: 100%;
}

.plan-cell .task-image {
  min-height: 105px;
  height: 105px;
  flex: none;
}

.plan-cell .task-image img {
  max-width: 120px;
  max-height: 100px;
}

.plan-cell .task-name {
  min-height: 34px;
  max-height: 44px;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.15;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 4px;
}

/* NØD-FIX: behold gammel UI, men fiks bilde/tekst */
.single-task-card {
  display: grid !important;
  grid-template-rows: 105px auto !important;
  height: 100% !important;
}

.plan-cell .task-image {
  height: 105px !important;
  min-height: 105px !important;
  max-height: 105px !important;
  flex: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.plan-cell .task-image img {
  max-width: 120px !important;
  max-height: 100px !important;
  object-fit: contain !important;
}

.plan-cell .task-name {
  min-height: 34px !important;
  max-height: 46px !important;
  overflow: hidden !important;
  font-size: 13px !important;
  line-height: 1.15 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 0 4px !important;
}

/* NØD-FIX: liten slett-knapp */
.task-card .delete-task,
.task-card .small-delete-task {
  position: absolute !important;
  top: 6px !important;
  right: 6px !important;
  width: 22px !important;
  height: 22px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 50% !important;
  background: rgba(0, 0, 0, 0.55) !important;
  color: white !important;
  font-size: 13px !important;
  line-height: 22px !important;
  text-align: center !important;
  cursor: pointer !important;
  opacity: 0 !important;
  box-shadow: none !important;
}

.task-card:hover .delete-task,
.task-card:hover .small-delete-task {
  opacity: 1 !important;
}

/* ===============================
   MinTakt Task Picker UI
   Trygt tillegg - legges nederst
   =============================== */
.task-picker-overlay {
  z-index: 2000;
}

.task-picker-card {
  width: min(1180px, 96vw);
  max-height: 90vh;
  overflow: hidden;
  background: #ffffff;
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(31, 42, 36, 0.24);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.task-picker-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.task-picker-header h2 {
  margin: 0;
  font-size: 30px;
  color: #1f2a24;
}

.task-picker-header p {
  margin: 6px 0 0;
  color: #6a7a72;
  font-size: 15px;
}

.task-picker-close {
  width: 38px;
  height: 38px;
  padding: 0;
  margin: 0;
  border-radius: 999px;
  background: #eef3f0;
  color: #1f2a24;
  font-size: 24px;
  line-height: 38px;
}

.task-picker-close:hover {
  background: #dce6e1;
}

.task-picker-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
}

.task-search {
  flex: 1;
  border: 1px solid #d7e3dd;
  background: #f8fbf9;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 15px;
  outline: none;
}

.task-search:focus {
  border-color: #2f7d5c;
  box-shadow: 0 0 0 3px rgba(47, 125, 92, 0.12);
}

.task-style-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.task-style-tab {
  margin: 0;
  padding: 10px 13px;
  border-radius: 999px;
  background: #eef3f0;
  color: #33443a;
  font-size: 13px;
  font-weight: 800;
}

.task-style-tab:hover,
.task-style-tab.active {
  background: #2f7d5c;
  color: #ffffff;
}

.task-picker-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 280px;
  gap: 18px;
  min-height: 520px;
  overflow: hidden;
}

.task-category-sidebar {
  background: #f4f8f6;
  border-radius: 22px;
  padding: 12px;
  overflow: auto;
}

.task-category-button {
  width: 100%;
  margin: 0 0 8px;
  padding: 12px 13px;
  border-radius: 16px;
  background: transparent;
  color: #1f2a24;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 900;
  text-align: left;
}

.task-category-button small {
  background: #ffffff;
  color: #6a7a72;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
}

.task-category-button:hover,
.task-category-button.active {
  background: #dcefe5;
}

.task-picker-main {
  overflow: auto;
  padding-right: 4px;
}

.task-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 14px;
}

.task-picker-item {
  margin: 0;
  padding: 12px;
  min-height: 175px;
  border-radius: 20px;
  background: #f8fbf9;
  color: #1f2a24;
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.task-picker-item:hover,
.task-picker-item.selected {
  background: #ffffff;
  border-color: #2f7d5c;
  box-shadow: 0 10px 24px rgba(31, 42, 36, 0.10);
}

.task-picker-thumb {
  width: 100%;
  height: 96px;
  background: #ffffff;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.task-picker-thumb img {
  max-width: 92px;
  max-height: 86px;
  object-fit: contain;
}

.task-picker-item-title {
  font-weight: 900;
  font-size: 14px;
}

.task-picker-item-meta {
  font-size: 11px;
  color: #6a7a72;
  font-weight: 700;
}

.task-preview-panel {
  background: linear-gradient(180deg, #f4f8f6, #eef3f0);
  border-radius: 24px;
  padding: 18px;
  text-align: center;
  overflow: auto;
}

.task-preview-empty {
  padding: 70px 10px;
  color: #6a7a72;
}

.task-preview-emoji {
  font-size: 38px;
  margin-bottom: 12px;
}

.task-preview-image-wrap {
  height: 210px;
  background: #ffffff;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  margin-bottom: 16px;
}

.task-preview-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.task-preview-content h3 {
  margin: 0 0 6px;
  font-size: 24px;
}

.task-preview-content p {
  margin: 0 0 18px;
  color: #6a7a72;
  font-weight: 700;
}

.task-add-button {
  width: 100%;
  margin-top: 0;
}

.task-picker-no-results {
  grid-column: 1 / -1;
  background: #f8fbf9;
  border-radius: 18px;
  padding: 28px;
  color: #6a7a72;
  font-weight: 800;
  text-align: center;
}

@media (max-width: 1050px) {
  .task-picker-layout {
    grid-template-columns: 170px minmax(0, 1fr);
  }

  .task-preview-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .task-picker-card {
    padding: 16px;
  }

  .task-picker-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .task-picker-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .task-picker-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

/* ===============================
   MinTakt planner header - FINAL
   =============================== */

.planner-header-branded {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 20px !important;
  margin-bottom: 26px !important;
}

.planner-brand-block {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
}

.planner-logo,
.planner-header img.planner-logo {
  display: none !important;
}

.planner-logo-small,
.planner-header img.planner-logo-small {
  width: 58px !important;
  height: 58px !important;
  min-width: 58px !important;
  max-width: 58px !important;
  min-height: 58px !important;
  max-height: 58px !important;
  object-fit: contain !important;
  display: block !important;
  flex-shrink: 0 !important;
}

.planner-title-block h1,
.planner-brand-block h1 {
  margin: 0 !important;
  font-size: 34px !important;
  line-height: 1.08 !important;
  color: #1f2a24 !important;
}

.planner-title-block p,
.planner-brand-block p {
  margin: 4px 0 0 !important;
  color: #6a7a72 !important;
  font-size: 16px !important;
  line-height: 1.2 !important;
}

@media (max-width: 760px) {
  .planner-header-branded {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .planner-logo-small,
  .planner-header img.planner-logo-small {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
  }

  .planner-title-block h1,
  .planner-brand-block h1 {
    font-size: 28px !important;
  }
}


/* ===============================
   MinTakt planner actions / back button
   =============================== */

.planner-header-actions {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-shrink: 0 !important;
}

.back-user-button {
  margin-top: 0 !important;
  background: #eef3f0 !important;
  color: #1f2a24 !important;
  border: 1px solid #d7e3dd !important;
}

.back-user-button:hover {
  background: #dce6e1 !important;
}

@media (max-width: 760px) {
  .planner-header-actions {
    width: 100% !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
  }
}


/* ===============================
   Mine oppgaver / egen opplasting
   =============================== */
.custom-task-card { max-width: 560px !important; }
.custom-upload-box { margin-top: 12px; min-height: 220px; border: 2px dashed #cfe0d8; background: #f8fbf9; border-radius: 20px; cursor: pointer; display: flex !important; align-items: center; justify-content: center; text-align: center; overflow: hidden; padding: 18px; }
.custom-upload-box input[type="file"] { display: none; }
#custom-upload-placeholder { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #5a6b63; }
.custom-upload-plus { width: 58px; height: 58px; border-radius: 999px; background: #e8f3ee; color: #2f7d5c; font-size: 42px; line-height: 54px; font-weight: 900; }
#custom-task-image-preview { max-width: 100%; max-height: 260px; object-fit: contain; border-radius: 16px; }
.custom-task-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.custom-add-task-card { border: 2px dashed #b9d4c8 !important; background: #f4f8f6 !important; justify-content: center !important; }
.custom-add-task-card:hover { background: #e8f3ee !important; border-color: #2f7d5c !important; }
.custom-add-plus { width: 72px; height: 72px; border-radius: 999px; background: #ffffff; color: #2f7d5c; display: flex; align-items: center; justify-content: center; font-size: 52px; line-height: 1; font-weight: 900; box-shadow: 0 8px 20px rgba(31,42,36,0.08); }
.custom-task-item .task-picker-thumb img { max-width: 100%; max-height: 92px; border-radius: 12px; }
.custom-task-delete { position: absolute !important; left: 14px !important; top: 12px !important; z-index: 3 !important; width: 28px !important; height: 28px !important; border-radius: 999px !important; background: rgba(31, 42, 36, 0.72) !important; color: #ffffff !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; font-size: 18px !important; font-weight: 900 !important; }
.custom-task-delete:hover { background: #9d2d2d !important; }
.custom-style-note { background: #f4f8f6; border-radius: 16px; padding: 18px; color: #5a6b63; font-weight: 700; }

/* ===============================
   FIX: kategori-tall + Mine oppgaver knapp
   =============================== */

.task-category-button {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 34px !important;
  align-items: center !important;
  column-gap: 12px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.task-category-button span,
.task-category-button .category-label {
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
  line-height: 1.15 !important;
}

.task-category-button small,
.task-category-button .category-count {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  padding: 0 !important;
  margin: 0 !important;
  justify-self: end !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
}

.custom-add-task-card,
.custom-add-task-card * {
  cursor: pointer !important;
}

.custom-add-task-card .custom-add-plus,
.custom-add-task-card .task-picker-item-title,
.custom-add-task-card .task-picker-item-meta {
  pointer-events: none !important;
}

/* ===============================
   FINAL FIX: Mine oppgaver popup + enkel preview
   =============================== */

#custom-task-popup {
  z-index: 5000 !important;
}

#custom-task-popup.show {
  display: flex !important;
}

#custom-task-popup .popup-card {
  z-index: 5001 !important;
  position: relative !important;
}

/* Task Picker preview tilbake til enkel og kompakt variant */
.task-preview-panel {
  overflow-y: auto !important;
  max-height: 100% !important;
  padding: 16px !important;
}

.task-preview-image-wrap {
  height: 160px !important;
  min-height: 160px !important;
  max-height: 160px !important;
  padding: 12px !important;
  margin-bottom: 12px !important;
}

.task-preview-content h3 {
  font-size: 22px !important;
  margin: 0 0 4px !important;
}

.task-preview-content p {
  font-size: 13px !important;
  margin: 0 0 12px !important;
}

.preview-section-title,
.apply-style-all-button,
.sequence-preview-block {
  display: none !important;
}

.preview-style-choices {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin: 10px 0 12px !important;
}

.preview-style-choice {
  margin: 0 !important;
  padding: 8px !important;
  border-radius: 14px !important;
  min-height: auto !important;
}

.preview-style-choice-image {
  height: 46px !important;
  min-height: 46px !important;
  max-height: 46px !important;
}

.preview-style-choice-image img {
  max-width: 48px !important;
  max-height: 44px !important;
}

.task-add-button {
  margin-top: 8px !important;
  padding: 13px 18px !important;
}

/* Kategoritall holder seg på linje */
.task-category-button {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 34px !important;
  align-items: center !important;
  column-gap: 12px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.task-category-button span,
.task-category-button .category-label {
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
  line-height: 1.15 !important;
}

.task-category-button small,
.task-category-button .category-count {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  padding: 0 !important;
  margin: 0 !important;
  justify-self: end !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
}

/* ===============================
   FINAL FIX: bredere kategoriliste
   =============================== */

.task-picker-card {
  width: min(1320px, 98vw) !important;
}

.task-picker-layout {
  grid-template-columns: 300px minmax(0, 1fr) 280px !important;
  gap: 20px !important;
}

.task-category-sidebar {
  min-width: 300px !important;
}

.task-category-button {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 34px !important;
  align-items: center !important;
  column-gap: 12px !important;
  width: 100% !important;
  padding: 12px 14px !important;
  box-sizing: border-box !important;
}

.task-category-button span,
.task-category-button .category-label {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.15 !important;
}

.task-category-button small,
.task-category-button .category-count {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  justify-self: end !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

@media (max-width: 1050px) {
  .task-picker-layout {
    grid-template-columns: 240px minmax(0, 1fr) !important;
  }

  .task-category-sidebar {
    min-width: 240px !important;
  }
}

@media (max-width: 760px) {
  .task-picker-layout {
    grid-template-columns: 1fr !important;
  }

  .task-category-sidebar {
    min-width: 0 !important;
  }

  .task-category-button span,
  .task-category-button .category-label {
    white-space: normal !important;
  }
}

/* ===============================
   FINAL FIX: ren preview uten dobbelt stilvalg
   =============================== */

.preview-section-title,
.preview-style-choices,
.preview-style-choice,
.apply-style-all-button,
.sequence-preview-block {
  display: none !important;
}

.task-preview-panel {
  overflow-y: auto !important;
  padding: 16px !important;
}

.task-preview-image-wrap {
  height: 170px !important;
  min-height: 170px !important;
  max-height: 170px !important;
  padding: 12px !important;
  margin-bottom: 14px !important;
}

.task-preview-content h3 {
  font-size: 24px !important;
  margin: 0 0 4px !important;
}

.task-preview-content p {
  font-size: 14px !important;
  margin: 0 0 16px !important;
}

.task-add-button {
  display: block !important;
  width: 100% !important;
  margin-top: 8px !important;
  padding: 15px 18px !important;
  border-radius: 14px !important;
}


/* Copy task */
.copy-task-button{
position:absolute!important;
top:6px!important;
left:6px!important;
width:22px!important;
height:22px!important;
border:none!important;
border-radius:50%!important;
background:rgba(0,0,0,0.55)!important;
color:white!important;
font-size:11px!important;
padding:0!important;
opacity:0!important;
cursor:pointer!important;
}

.task-card:hover .copy-task-button{
opacity:1!important;
}

.paste-task{
margin:auto;
font-size:15px;
font-weight:800;
color:#2f7d5c;
}

/* ===============================
   MinTakt Home v2
   =============================== */

.home-page {
  background:
    radial-gradient(circle at top left, rgba(184, 211, 192, 0.65), transparent 28%),
    radial-gradient(circle at bottom right, rgba(199, 221, 204, 0.75), transparent 30%),
    linear-gradient(180deg, #fbfaf4 0%, #edf4ed 100%);
  color: #1f2a24;
}

.home-shell {
  min-height: 100vh;
  padding: 34px clamp(22px, 5vw, 80px) 44px;
  overflow: hidden;
}

.home-hero {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 8px 0 32px;
}

.home-hero::before,
.home-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(184, 211, 192, 0.55);
  filter: blur(1px);
  z-index: 0;
}

.home-hero::before {
  width: 210px;
  height: 210px;
  top: -120px;
  left: -130px;
}

.home-hero::after {
  width: 260px;
  height: 260px;
  right: -160px;
  bottom: -80px;
}

.home-top {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-bottom: 42px;
}

.home-logo {
  width: min(360px, 76vw);
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto 8px;
}

.home-tagline {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #33443a;
  font-weight: 800;
}

.home-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: clamp(28px, 6vw, 70px);
  align-items: center;
}

.home-hero-text h1 {
  margin: 0;
  max-width: 620px;
  font-size: clamp(42px, 6vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: #0f5134;
}

.home-hero-text p {
  max-width: 560px;
  margin: 28px 0 0;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
  color: #283830;
}

.home-actions {
  margin-top: 34px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.home-primary-button {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, #2f7d5c, #0f6a3f);
  color: #ffffff;
  text-decoration: none;
  padding: 20px 34px;
  border-radius: 22px;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 18px 34px rgba(15, 106, 63, 0.24);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.home-primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 42px rgba(15, 106, 63, 0.3);
}

.home-primary-button span {
  font-size: 34px;
  line-height: 1;
}

.home-safe-note {
  color: #41564a;
  font-size: 15px;
  font-weight: 700;
}

.home-safe-note::before {
  content: "♡";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  color: #2f7d5c;
  font-weight: 900;
}

.home-preview-card {
  transform: rotate(4deg);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(207, 224, 216, 0.9);
  border-radius: 28px;
  padding: 22px;
  box-shadow: 0 26px 60px rgba(31, 42, 36, 0.16);
}

.home-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.home-preview-header strong {
  display: block;
  font-size: 28px;
  color: #1f2a24;
  line-height: 1;
}

.home-preview-header span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #5a6b63;
  font-weight: 700;
}

.home-preview-header img {
  width: 92px;
  height: auto;
  object-fit: contain;
}

.home-mini-grid {
  display: grid;
  grid-template-columns: 64px repeat(3, 1fr);
  border: 1px solid #dfe8e3;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
}

.home-mini-grid > div {
  min-height: 72px;
  border-right: 1px solid #e5eee9;
  border-bottom: 1px solid #e5eee9;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-direction: column;
  gap: 4px;
  font-weight: 800;
}

.home-mini-grid .mini-day,
.home-mini-grid .mini-time:first-child {
  min-height: 42px;
  background: #1f6f4a;
  color: #ffffff;
}

.mini-time {
  background: #f8fbf9;
  font-size: 13px;
}

.mini-cell {
  font-size: 24px;
}

.mini-cell span {
  display: block;
  font-size: 11px;
  color: #1f2a24;
}

.home-feature-row {
  max-width: 1120px;
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.home-feature-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(207, 224, 216, 0.9);
  border-radius: 28px;
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 16px 36px rgba(31,42,36,0.08);
}

.home-feature-icon {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2f7d5c, #dfeec6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  margin-bottom: 18px;
}

.home-feature-card h2 {
  margin: 0;
  color: #0f6a3f;
  font-size: 28px;
}

.home-feature-card p {
  margin: 14px auto 0;
  max-width: 250px;
  line-height: 1.5;
  color: #283830;
  font-size: 16px;
}

.home-wide-preview {
  max-width: 1120px;
  margin: 34px auto 0;
  background: rgba(218, 233, 222, 0.66);
  border: 1px solid rgba(207, 224, 216, 0.9);
  border-radius: 30px;
  padding: 30px;
  text-align: center;
}

.home-wide-preview h2 {
  margin: 0;
  font-size: 30px;
  color: #0f6a3f;
}

.home-wide-preview p {
  margin: 8px 0 22px;
  color: #41564a;
}

.wide-mini-plan {
  display: grid;
  grid-template-columns: 76px repeat(5, 1fr);
  overflow: hidden;
  border: 1px solid #d7e3dd;
  border-radius: 18px;
  background: #ffffff;
}

.wide-mini-plan > div {
  min-height: 72px;
  border-right: 1px solid #e5eee9;
  border-bottom: 1px solid #e5eee9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-weight: 800;
  gap: 4px;
}

.wide-mini-plan .wide-head {
  min-height: 46px;
  background: #eaf4ef;
  color: #0f5134;
}

.wide-mini-plan .wide-head:first-child {
  background: #2f7d5c;
  color: #ffffff;
}

.wide-time {
  background: #f8fbf9;
  font-size: 13px;
}

.wide-mini-plan span {
  font-size: 11px;
  color: #1f2a24;
}

.home-footer {
  max-width: 900px;
  margin: 34px auto 0;
  text-align: center;
  color: #283830;
  font-size: 18px;
}

@media (max-width: 980px) {
  .home-hero-grid {
    grid-template-columns: 1fr;
  }

  .home-preview-card {
    transform: none;
    max-width: 560px;
    margin: 0 auto;
  }

  .home-feature-row {
    grid-template-columns: 1fr;
  }

  .wide-mini-plan {
    grid-template-columns: 70px repeat(3, minmax(110px, 1fr));
    overflow-x: auto;
  }
}

@media (max-width: 640px) {
  .home-shell {
    padding: 24px 16px 34px;
  }

  .home-tagline {
    font-size: 11px;
  }

  .home-primary-button {
    width: 100%;
    justify-content: center;
    font-size: 21px;
  }

  .home-preview-card {
    padding: 14px;
  }

  .home-mini-grid {
    grid-template-columns: 56px repeat(3, 105px);
    overflow-x: auto;
  }
}

/* ===============================
   MinTakt Create v2
   =============================== */

.create-page{background:radial-gradient(circle at top left,rgba(184,211,192,.62),transparent 28%),radial-gradient(circle at bottom right,rgba(199,221,204,.72),transparent 30%),linear-gradient(180deg,#fbfaf4 0%,#edf4ed 100%);color:#1f2a24}
.create-shell{min-height:100vh;padding:34px clamp(18px,5vw,80px) 46px}
.create-top{text-align:center;margin:0 auto 26px}
.create-logo-link{display:inline-block}
.create-logo{width:min(360px,76vw);height:auto;object-fit:contain;display:block;margin:0 auto 8px}
.create-tagline{margin:0;font-size:13px;letter-spacing:.18em;text-transform:uppercase;color:#33443a;font-weight:800}
.create-card{max-width:1060px;margin:0 auto;background:rgba(255,255,255,.92);border:1px solid rgba(207,224,216,.95);border-radius:30px;box-shadow:0 24px 60px rgba(31,42,36,.13);padding:clamp(26px,5vw,54px)}
.create-card-header{text-align:center;margin-bottom:34px}
.create-card-header h1{margin:0;color:#0f5134;font-size:clamp(36px,5vw,52px);line-height:1.05;letter-spacing:-.03em}
.create-card-header p{margin:14px 0 0;color:#283830;font-size:19px}.create-card-header span{color:#6fa474;font-weight:900}
.create-form{display:flex;flex-direction:column;gap:36px}
.create-step{display:grid;grid-template-columns:54px minmax(0,1fr);gap:18px;align-items:start}
.create-step-number{width:54px;height:54px;border-radius:999px;background:#dcebdc;color:#0f5134;display:flex;align-items:center;justify-content:center;font-size:26px;font-weight:900}
.create-step-content h2,.create-label{margin:0 0 10px;color:#0f5134;font-size:28px;line-height:1.15;font-weight:900;display:block}
.create-section-text{margin:0 0 20px;color:#283830;font-size:17px}
.create-input-wrap{position:relative}.create-input-wrap input{width:100%;box-sizing:border-box;border-radius:14px;border:2px solid #d7e3dd;padding:18px 54px 18px 20px;font-size:20px;outline:none;background:#fff}
.create-input-wrap input:focus,.create-input-wrap input:valid{border-color:#2f7d5c;box-shadow:0 0 0 4px rgba(47,125,92,.1)}
.create-input-check{position:absolute;right:20px;top:50%;transform:translateY(-50%);color:#2f7d5c;font-size:28px;font-weight:900;opacity:0}.create-input-wrap input:valid+.create-input-check{opacity:1}
.create-help{margin:10px 0 0;color:#5a6b63;font-size:15px}
.age-card-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}
.age-choice-card{position:relative;background:#fff;border:2px solid #e1ebe6;border-radius:20px;padding:22px 14px 20px;min-height:210px;cursor:pointer;text-align:center;box-shadow:0 10px 24px rgba(31,42,36,.04);transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}
.age-choice-card:hover{transform:translateY(-2px);border-color:#9fc8b2;box-shadow:0 16px 28px rgba(31,42,36,.08)}
.age-choice-card input{position:absolute;opacity:0;pointer-events:none}
.age-avatar{width:94px;height:94px;border-radius:999px;margin:0 auto 16px;background:linear-gradient(135deg,#dfeec6,#eef5ee);display:flex;align-items:center;justify-content:center;font-size:48px}
.age-choice-card strong{display:block;color:#0f5134;font-size:23px;font-weight:900}.age-choice-card small{display:block;margin-top:8px;color:#283830;font-size:16px}
.age-check{position:absolute;top:16px;right:16px;width:34px;height:34px;border-radius:999px;background:#2f7d5c;color:#fff;display:none;align-items:center;justify-content:center;font-weight:900;font-size:19px}
.age-choice-card:has(input:checked){border-color:#2f7d5c;box-shadow:0 18px 34px rgba(47,125,92,.13)}
.age-choice-card:has(input:checked) .age-check{display:flex}
.create-info-note{margin-top:20px;background:linear-gradient(90deg,#eef5ee,#f7faf7);color:#283830;border-radius:14px;padding:14px 16px;font-size:16px;display:flex;align-items:center;gap:12px}
.create-info-note span{width:26px;height:26px;border-radius:999px;background:#88ad8b;color:#fff;display:inline-flex;align-items:center;justify-content:center;font-weight:900;flex-shrink:0}
.create-submit-wrap{text-align:center;margin-top:4px}.create-submit-button{display:inline-flex;align-items:center;justify-content:center;gap:18px;min-width:min(520px,100%);margin:0;background:linear-gradient(135deg,#2f7d5c,#0f6a3f);color:#fff;border-radius:18px;padding:20px 34px;font-size:25px;font-weight:900;box-shadow:0 18px 34px rgba(15,106,63,.24)}
.create-submit-button:hover{background:linear-gradient(135deg,#276a4e,#0d5c36)}.create-submit-button strong{font-size:34px;line-height:1}.create-private-note{margin:14px 0 0;color:#5a6b63;font-size:15px;font-weight:700}
.create-feature-row{max-width:1060px;margin:34px auto 0;display:grid;grid-template-columns:repeat(3,1fr);gap:26px}
.create-feature-row article{display:grid;grid-template-columns:64px 1fr;gap:16px;align-items:start}.create-feature-row article>div{width:64px;height:64px;border-radius:999px;background:linear-gradient(135deg,#dcebdc,#eef5ee);display:flex;align-items:center;justify-content:center;font-size:30px}
.create-feature-row h3{margin:0;color:#0f5134;font-size:20px}.create-feature-row p{margin:6px 0 0;color:#283830;line-height:1.45}
@media (max-width:900px){.age-card-grid,.create-feature-row{grid-template-columns:repeat(2,1fr)}.create-feature-row article{grid-template-columns:54px 1fr}}
@media (max-width:620px){.create-shell{padding:24px 16px 34px}.create-tagline{font-size:11px}.create-card{padding:24px 18px;border-radius:24px}.create-step{grid-template-columns:1fr;gap:12px}.create-step-number{width:44px;height:44px;font-size:22px}.age-card-grid,.create-feature-row{grid-template-columns:1fr}.age-choice-card{min-height:auto}.create-submit-button{width:100%;min-width:0;font-size:22px}}

/* ===============================
   FINAL: clean create age cards + planner header
   =============================== */

.age-avatar {
  display: none !important;
}

.age-choice-card {
  min-height: 132px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 26px 16px !important;
}

.age-choice-card strong {
  font-size: 25px !important;
}

.age-choice-card small {
  font-size: 17px !important;
}

.planner-title-block p#user-info {
  display: none !important;
}

.planner-brand-block {
  align-items: center !important;
}

.planner-title-block h1,
.planner-brand-block h1 {
  margin: 0 !important;
}

/* ===============================
   FINAL PDF FIX v2: kompakte rader + én ren ramme
   =============================== */

@media print {
  @page {
    size: A4 landscape;
    margin: 5mm;
  }

  body {
    background: #ffffff !important;
  }

  .planner-page {
    padding: 0 !important;
    min-height: auto !important;
  }

  .planner-header-branded {
    margin-bottom: 3mm !important;
  }

  .planner-header-actions,
  .copy-task-button,
  .delete-task,
  .small-delete-task,
  .add-row-cell,
  .empty-cell {
    display: none !important;
  }

  .planner-title-block p#user-info {
    display: none !important;
  }

  .week-grid {
    width: 100% !important;
    gap: 2mm !important;
    align-items: start !important;
  }

  .corner-cell {
    min-height: 8mm !important;
  }

  .week-day-header {
    min-height: 8mm !important;
    padding: 1.6mm 1mm !important;
    border-radius: 2mm !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 9pt !important;
    line-height: 1 !important;
  }

  .time-cell {
    min-height: 0 !important;
    height: auto !important;
    padding: 1mm !important;
    border-radius: 2mm !important;
  }

  .plan-cell {
    min-height: 0 !important;
    padding: 1.6mm !important;
    border-radius: 2.5mm !important;
    border: 1px solid #cfe0d8 !important;
    background: #ffffff !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    overflow: hidden !important;
  }

  /* Fast, pen høyde når planen bare har 1-4 brukte rader */
  body.pdf-rows-1 .plan-cell,
  body.pdf-rows-1 .time-cell {
    height: 43mm !important;
  }

  body.pdf-rows-2 .plan-cell,
  body.pdf-rows-2 .time-cell {
    height: 43mm !important;
  }

  body.pdf-rows-3 .plan-cell,
  body.pdf-rows-3 .time-cell {
    height: 38mm !important;
  }

  body.pdf-rows-4 .plan-cell,
  body.pdf-rows-4 .time-cell {
    height: 33mm !important;
  }

  body.pdf-rows-many .plan-cell,
  body.pdf-rows-many .time-cell {
    height: auto !important;
  }

  /* Fjern ekstra kort/ramme inni cellen: én celle = én ramme */
  .plan-cell .task-card,
  .single-task-card {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
    gap: 1.2mm !important;
    align-items: stretch !important;
  }

  /* Fjern den indre bilde-rammen, men behold et diskret bildeområde */
  .plan-cell .task-image,
  .task-card .task-image {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
  }

  .plan-cell .task-image img,
  .task-card .task-image img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    display: block !important;
  }

  .plan-cell .task-name,
  .task-card .task-name {
    min-height: 0 !important;
    max-height: none !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 10pt !important;
    line-height: 1.05 !important;
    font-weight: 900 !important;
    text-align: center !important;
  }
}

/* Samme visuelle opprydding i forhåndsvisning/print-preview dersom nettleseren viser skjerm-CSS */
.pdf-preview .plan-cell .task-card,
.pdf-sheet .plan-cell .task-card,
.print-preview .plan-cell .task-card {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 !important;
}

.pdf-preview .plan-cell .task-image,
.pdf-sheet .plan-cell .task-image,
.print-preview .plan-cell .task-image {
  background: transparent !important;
  padding: 0 !important;
}

.pdf-preview .plan-cell .task-image img,
.pdf-sheet .plan-cell .task-image img,
.print-preview .plan-cell .task-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

/* ===============================
   FINAL PDF FIX v3: actual generated PDF cleanup
   =============================== */

@media print {
  .pdf-grid {
    align-items: start !important;
  }

  .pdf-task {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
  }

  .pdf-task-image {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
  }

  .pdf-task-image img {
    object-fit: contain !important;
  }
}

/* ===============================
   MinTakt image profile tabs
   =============================== */

.task-picker-topbar {
  flex-wrap: wrap !important;
}

.task-gender-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.task-gender-tab {
  margin: 0 !important;
  padding: 10px 14px !important;
  border-radius: 999px !important;
  background: #eef3f0 !important;
  color: #33443a !important;
  font-size: 20px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  min-width: 44px !important;
}

.task-gender-tab:hover,
.task-gender-tab.active {
  background: #2f7d5c !important;
  color: #ffffff !important;
}

.task-style-tabs {
  flex: 1 1 auto;
}

/* ===============================
   MinTakt live task library feedback
   =============================== */

.task-picker-no-results small {
  display: block;
  margin-top: 8px;
  color: #7a8a82;
  font-size: 13px;
  line-height: 1.35;
}


/* ===============================
   MinTakt saved plans
   =============================== */
.saved-plans-card { max-width: 860px !important; text-align: left !important; }
.saved-plans-header { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:20px; }
.saved-plans-header h2 { margin:0 !important; }
.saved-plans-header p { margin:6px 0 0 !important; }
.saved-plans-list { display:flex; flex-direction:column; gap:12px; max-height:58vh; overflow:auto; padding-right:4px; }
.saved-plan-item { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:16px; align-items:center; background:#f8fbf9; border:1px solid #dfe8e3; border-radius:18px; padding:16px; }
.saved-plan-info strong { display:block; color:#1f2a24; font-size:18px; line-height:1.2; }
.saved-plan-info span { display:block; margin-top:5px; color:#6a7a72; font-size:13px; font-weight:700; }
.saved-plan-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.saved-plan-actions .small-button { margin-top:0 !important; }
.delete-plan-button { background:#f3e8e8 !important; color:#7b2d2d !important; border:1px solid #e5caca !important; }
.delete-plan-button:hover { background:#ead4d4 !important; }
.saved-plans-empty { background:#f8fbf9; border:1px dashed #cfe0d8; border-radius:18px; padding:28px; text-align:center; color:#6a7a72; }
.saved-plans-empty strong, .saved-plans-empty span { display:block; }
.saved-plans-empty strong { color:#1f2a24; margin-bottom:8px; }
.save-plan-feedback { position:fixed; right:28px; bottom:28px; z-index:9999; background:#2f7d5c; color:#fff; border-radius:999px; padding:14px 20px; font-weight:900; box-shadow:0 12px 34px rgba(31,42,36,.22); opacity:0; transform:translateY(12px); pointer-events:none; transition:opacity .18s ease, transform .18s ease; }
.save-plan-feedback.show { opacity:1; transform:translateY(0); }
@media (max-width:760px){ .saved-plan-item{grid-template-columns:1fr;} .saved-plan-actions{justify-content:flex-start;} }

/* ===============================
   Planner header v2.0 - Planmeny
   =============================== */

.planner-header-branded {
  align-items: flex-start !important;
}

.planner-header-actions-v3 {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  flex-shrink: 0 !important;
  position: relative !important;
}

.plan-menu-wrapper {
  position: relative !important;
}

.plan-menu-button,
.pdf-preview-button {
  margin: 0 !important;
  height: 46px !important;
  padding: 0 18px !important;
  border-radius: 14px !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  box-shadow: 0 8px 22px rgba(31, 42, 36, 0.08) !important;
}

.plan-menu-button {
  background: #ffffff !important;
  color: #1f2a24 !important;
  border: 1px solid #d7e3dd !important;
}

.plan-menu-button:hover {
  background: #eef3f0 !important;
}

.pdf-preview-button {
  background: #2f7d5c !important;
  color: #ffffff !important;
}

.pdf-preview-button:hover {
  background: #276a4e !important;
}

.plan-menu-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  background: #ffffff;
  border: 1px solid #d7e3dd;
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(31, 42, 36, 0.16);
  padding: 8px;
  z-index: 3000;
}

.plan-menu-dropdown.show {
  display: block;
}

.plan-menu-dropdown button {
  width: 100% !important;
  margin: 0 !important;
  padding: 12px 14px !important;
  border-radius: 12px !important;
  background: transparent !important;
  color: #1f2a24 !important;
  text-align: left !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  box-shadow: none !important;
}

.plan-menu-dropdown button:hover {
  background: #eef3f0 !important;
}

@media (max-width: 760px) {
  .planner-header-actions-v3 {
    width: 100% !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
  }

  .plan-menu-dropdown {
    left: 0;
    right: auto;
  }
}

/* ===============================
   MinTakt Home/Create compact v3
   =============================== */

/* HOME: mindre overdimensjonert, mer desktop-vennlig */
.home-shell {
  padding: 22px clamp(20px, 4vw, 64px) 34px !important;
}

.home-hero {
  max-width: 1180px !important;
  padding: 0 0 20px !important;
}

.home-top {
  margin-bottom: 26px !important;
}

.home-logo {
  width: min(245px, 54vw) !important;
  margin-bottom: 4px !important;
}

.home-tagline,
.create-tagline {
  font-size: 11px !important;
  letter-spacing: 0.2em !important;
}

.home-hero-grid {
  grid-template-columns: minmax(0, 1fr) 390px !important;
  gap: clamp(24px, 4vw, 54px) !important;
}

.home-hero-text h1 {
  max-width: 620px !important;
  font-size: clamp(42px, 5vw, 60px) !important;
  line-height: 1.06 !important;
}

.home-hero-text p {
  max-width: 520px !important;
  margin-top: 20px !important;
  font-size: clamp(16px, 1.7vw, 19px) !important;
  line-height: 1.45 !important;
}

.home-actions {
  margin-top: 24px !important;
  gap: 12px !important;
}

.home-primary-button {
  padding: 16px 28px !important;
  border-radius: 18px !important;
  font-size: 21px !important;
}

.home-preview-card {
  padding: 18px !important;
  border-radius: 24px !important;
  transform: rotate(3deg) !important;
}

.home-preview-header strong {
  font-size: 25px !important;
}

.home-preview-header span {
  font-size: 13px !important;
  color: #33443a !important;
}

.home-preview-header img {
  width: 70px !important;
}

.home-mini-grid {
  grid-template-columns: 70px repeat(3, 1fr) !important;
}

.home-mini-grid > div {
  min-height: 58px !important;
}

.home-mini-grid .mini-day,
.home-mini-grid .mini-row-label:first-child,
.home-mini-grid .mini-time:first-child {
  min-height: 36px !important;
  background: #eaf4ef !important;
  color: #0f5134 !important;
}

.mini-row-label,
.mini-time {
  background: #f8fbf9 !important;
  color: #1f2a24 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

.mini-cell {
  font-size: 22px !important;
}

.mini-cell span {
  font-size: 10px !important;
}

.home-feature-row {
  max-width: 1040px !important;
  margin-top: 18px !important;
  gap: 18px !important;
}

.home-feature-card {
  border-radius: 22px !important;
  padding: 22px 20px !important;
}

.home-feature-icon {
  width: 62px !important;
  height: 62px !important;
  font-size: 28px !important;
  margin-bottom: 12px !important;
}

.home-feature-card h2 {
  font-size: 23px !important;
}

.home-feature-card p {
  margin-top: 8px !important;
  font-size: 14px !important;
}

.home-wide-preview {
  max-width: 1040px !important;
  margin-top: 22px !important;
  border-radius: 24px !important;
  padding: 22px !important;
}

.home-wide-preview h2 {
  font-size: 25px !important;
}

.home-wide-preview p {
  margin-bottom: 16px !important;
}

.wide-mini-plan > div {
  min-height: 56px !important;
}

.wide-mini-plan .wide-head {
  min-height: 38px !important;
}

.home-footer {
  margin-top: 20px !important;
  font-size: 15px !important;
}

/* CREATE: mindre luft, kortere side, fortsatt premium */
.create-shell {
  min-height: 100vh !important;
  padding: 22px clamp(18px, 4vw, 64px) 34px !important;
}

.create-top {
  margin-bottom: 20px !important;
}

.create-logo {
  width: min(245px, 54vw) !important;
  margin-bottom: 4px !important;
}

.create-card {
  max-width: 980px !important;
  border-radius: 26px !important;
  padding: clamp(22px, 3.2vw, 38px) !important;
}

.create-card-header {
  margin-bottom: 26px !important;
}

.create-card-header h1 {
  font-size: clamp(36px, 4.3vw, 48px) !important;
}

.create-card-header p {
  margin-top: 10px !important;
  font-size: 17px !important;
}

.create-form {
  gap: 28px !important;
}

.create-step {
  grid-template-columns: 48px minmax(0, 1fr) !important;
  gap: 16px !important;
}

.create-step-number {
  width: 48px !important;
  height: 48px !important;
  font-size: 23px !important;
}

.create-step-content h2,
.create-label {
  font-size: 25px !important;
  margin-bottom: 8px !important;
}

.create-section-text {
  margin-bottom: 16px !important;
  font-size: 15px !important;
}

.create-input-wrap input {
  padding: 15px 50px 15px 18px !important;
  font-size: 18px !important;
}

.create-help {
  margin-top: 8px !important;
  font-size: 14px !important;
}

.age-card-grid {
  gap: 14px !important;
}

.age-choice-card {
  min-height: 104px !important;
  border-radius: 18px !important;
  padding: 20px 14px !important;
}

.age-choice-card strong {
  font-size: 22px !important;
}

.age-choice-card small {
  margin-top: 5px !important;
  font-size: 15px !important;
}

.age-check {
  top: 12px !important;
  right: 12px !important;
  width: 28px !important;
  height: 28px !important;
  font-size: 16px !important;
}

.create-info-note {
  margin-top: 14px !important;
  padding: 12px 14px !important;
  font-size: 14px !important;
}

.create-submit-button {
  padding: 16px 30px !important;
  min-width: min(440px, 100%) !important;
  border-radius: 16px !important;
  font-size: 22px !important;
}

.create-private-note {
  margin-top: 10px !important;
  font-size: 14px !important;
}

.create-feature-row {
  max-width: 980px !important;
  margin-top: 22px !important;
  gap: 18px !important;
}

.create-feature-row article {
  grid-template-columns: 52px 1fr !important;
  gap: 12px !important;
}

.create-feature-row article > div {
  width: 52px !important;
  height: 52px !important;
  font-size: 25px !important;
}

.create-feature-row h3 {
  font-size: 18px !important;
}

.create-feature-row p {
  font-size: 14px !important;
}

@media (max-width: 980px) {
  .home-hero-grid {
    grid-template-columns: 1fr !important;
  }

  .home-preview-card {
    transform: none !important;
  }
}

@media (max-width: 620px) {
  .create-step {
    grid-template-columns: 1fr !important;
  }
}

/* ===============================
   MinTakt Home/Create desktop compact v4
   =============================== */

/* HOME v4: markant mindre, uten å fjerne innhold */
.home-shell {
  padding: 14px clamp(18px, 3.2vw, 50px) 24px !important;
}

.home-hero {
  max-width: 1120px !important;
  padding-bottom: 12px !important;
}

.home-top {
  margin-bottom: 18px !important;
}

.home-logo {
  width: min(190px, 42vw) !important;
  margin-bottom: 2px !important;
}

.home-tagline,
.create-tagline {
  font-size: 10px !important;
  letter-spacing: 0.18em !important;
}

.home-hero-grid {
  grid-template-columns: minmax(0, 1fr) 330px !important;
  gap: clamp(20px, 3.2vw, 40px) !important;
}

.home-hero-text h1 {
  max-width: 540px !important;
  font-size: clamp(34px, 4.1vw, 49px) !important;
  line-height: 1.06 !important;
}

.home-hero-text p {
  max-width: 480px !important;
  margin-top: 14px !important;
  font-size: clamp(14px, 1.35vw, 16px) !important;
  line-height: 1.42 !important;
}

.home-actions {
  margin-top: 18px !important;
  gap: 8px !important;
}

.home-primary-button {
  padding: 13px 23px !important;
  border-radius: 15px !important;
  font-size: 18px !important;
  gap: 12px !important;
}

.home-primary-button span {
  font-size: 27px !important;
}

.home-safe-note {
  font-size: 13px !important;
}

.home-preview-card {
  padding: 14px !important;
  border-radius: 20px !important;
  transform: rotate(2.5deg) !important;
}

.home-preview-header {
  margin-bottom: 10px !important;
}

.home-preview-header strong {
  font-size: 21px !important;
}

.home-preview-header span {
  margin-top: 4px !important;
  font-size: 11px !important;
}

.home-preview-header img {
  width: 54px !important;
}

.home-mini-grid {
  grid-template-columns: 58px repeat(3, 1fr) !important;
}

.home-mini-grid > div {
  min-height: 46px !important;
}

.home-mini-grid .mini-day,
.home-mini-grid .mini-row-label:first-child,
.home-mini-grid .mini-time:first-child {
  min-height: 30px !important;
  font-size: 11px !important;
}

.mini-row-label,
.mini-time {
  font-size: 10px !important;
}

.mini-cell {
  font-size: 18px !important;
}

.mini-cell span {
  font-size: 9px !important;
}

.home-feature-row {
  max-width: 960px !important;
  margin-top: 12px !important;
  gap: 14px !important;
}

.home-feature-card {
  border-radius: 18px !important;
  padding: 16px 16px !important;
}

.home-feature-icon {
  width: 48px !important;
  height: 48px !important;
  font-size: 22px !important;
  margin-bottom: 8px !important;
}

.home-feature-card h2 {
  font-size: 19px !important;
}

.home-feature-card p {
  margin-top: 6px !important;
  font-size: 12.5px !important;
  line-height: 1.35 !important;
}

.home-wide-preview {
  max-width: 960px !important;
  margin-top: 14px !important;
  border-radius: 20px !important;
  padding: 16px !important;
}

.home-wide-preview h2 {
  font-size: 21px !important;
}

.home-wide-preview p {
  margin: 4px 0 12px !important;
  font-size: 13px !important;
}

.wide-mini-plan {
  grid-template-columns: 62px repeat(5, 1fr) !important;
}

.wide-mini-plan > div {
  min-height: 44px !important;
  font-size: 15px !important;
}

.wide-mini-plan .wide-head {
  min-height: 31px !important;
  font-size: 12px !important;
}

.wide-time {
  font-size: 10px !important;
}

.wide-mini-plan span {
  font-size: 9px !important;
}

.home-footer {
  margin-top: 12px !important;
  font-size: 13px !important;
}

/* CREATE v4: mer kompakt og mindre "landing page" */
.create-shell {
  padding: 14px clamp(18px, 3.2vw, 50px) 24px !important;
}

.create-top {
  margin-bottom: 14px !important;
}

.create-logo {
  width: min(190px, 42vw) !important;
  margin-bottom: 2px !important;
}

.create-card {
  max-width: 860px !important;
  border-radius: 22px !important;
  padding: clamp(18px, 2.5vw, 30px) !important;
}

.create-card-header {
  margin-bottom: 20px !important;
}

.create-card-header h1 {
  font-size: clamp(31px, 3.5vw, 40px) !important;
  line-height: 1.04 !important;
}

.create-card-header p {
  margin-top: 7px !important;
  font-size: 15px !important;
}

.create-form {
  gap: 22px !important;
}

.create-step {
  grid-template-columns: 40px minmax(0, 1fr) !important;
  gap: 12px !important;
}

.create-step-number {
  width: 40px !important;
  height: 40px !important;
  font-size: 20px !important;
}

.create-step-content h2,
.create-label {
  font-size: 22px !important;
  margin-bottom: 6px !important;
}

.create-section-text {
  margin-bottom: 12px !important;
  font-size: 14px !important;
}

.create-input-wrap input {
  padding: 13px 44px 13px 16px !important;
  border-radius: 12px !important;
  font-size: 16px !important;
}

.create-input-check {
  right: 16px !important;
  font-size: 23px !important;
}

.create-help {
  margin-top: 6px !important;
  font-size: 12.5px !important;
}

.age-card-grid {
  gap: 10px !important;
}

.age-choice-card {
  min-height: 82px !important;
  border-radius: 15px !important;
  padding: 15px 12px !important;
}

.age-choice-card strong {
  font-size: 19px !important;
}

.age-choice-card small {
  margin-top: 3px !important;
  font-size: 13px !important;
}

.age-check {
  top: 9px !important;
  right: 9px !important;
  width: 23px !important;
  height: 23px !important;
  font-size: 13px !important;
}

.create-info-note {
  margin-top: 11px !important;
  padding: 10px 12px !important;
  border-radius: 12px !important;
  font-size: 12.8px !important;
}

.create-info-note span {
  width: 22px !important;
  height: 22px !important;
  font-size: 13px !important;
}

.create-submit-wrap {
  margin-top: 0 !important;
}

.create-submit-button {
  padding: 13px 24px !important;
  min-width: min(360px, 100%) !important;
  border-radius: 14px !important;
  font-size: 19px !important;
  gap: 12px !important;
}

.create-submit-button strong {
  font-size: 27px !important;
}

.create-private-note {
  margin-top: 7px !important;
  font-size: 12.5px !important;
}

.create-feature-row {
  max-width: 860px !important;
  margin-top: 14px !important;
  gap: 12px !important;
}

.create-feature-row article {
  grid-template-columns: 42px 1fr !important;
  gap: 10px !important;
}

.create-feature-row article > div {
  width: 42px !important;
  height: 42px !important;
  font-size: 20px !important;
}

.create-feature-row h3 {
  font-size: 16px !important;
}

.create-feature-row p {
  margin-top: 4px !important;
  font-size: 12.5px !important;
  line-height: 1.33 !important;
}

/* Store skjermer: hold alt mer samlet */
@media (min-width: 1200px) {
  .home-shell,
  .create-shell {
    padding-top: 16px !important;
  }

  .home-hero-grid {
    min-height: auto !important;
  }
}

@media (max-width: 980px) {
  .home-hero-grid {
    grid-template-columns: 1fr !important;
  }

  .home-preview-card {
    transform: none !important;
    max-width: 420px !important;
  }
}

@media (max-width: 620px) {
  .create-step {
    grid-template-columns: 1fr !important;
  }

  .age-card-grid,
  .create-feature-row {
    grid-template-columns: 1fr !important;
  }
}

/* ===============================
   MinTakt when-column polish v2
   =============================== */

/* Bredere venstre kolonne i planner */
.week-grid {
  grid-template-columns: 150px repeat(7, minmax(150px, 1fr)) !important;
  gap: 8px !important;
}

.corner-cell {
  min-height: 44px !important;
  background: #f7fbf8 !important;
  border: 1px solid #d7e3dd !important;
  border-radius: 12px !important;
  color: #0f5134 !important;
  font-size: 15px !important;
  font-weight: 950 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

.time-cell.editable-row-cell {
  min-width: 0 !important;
  padding: 10px 10px !important;
}

.time-cell.editable-row-cell .row-input {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  white-space: pre-wrap !important;
  hyphens: auto !important;
  font-size: 14px !important;
  line-height: 1.18 !important;
}

/* PDF/forhåndsvisning: sørg for at første kolonne også får "Når" og bedre bredde */
.pdf-grid,
.pdf-preview .week-grid,
.pdf-sheet .week-grid,
.print-preview .week-grid {
  grid-template-columns: 28mm repeat(7, 1fr) !important;
}

.pdf-corner-cell,
.pdf-preview .corner-cell,
.pdf-sheet .corner-cell,
.print-preview .corner-cell {
  background: #f7fbf8 !important;
  border: 1px solid #d7e3dd !important;
  border-radius: 2.5mm !important;
  color: #0f5134 !important;
  font-weight: 950 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

/* Litt mindre tekst i venstre felt ved lange ord/tidsrom */
.pdf-time-cell,
.pdf-preview .time-cell,
.pdf-sheet .time-cell,
.print-preview .time-cell {
  font-size: 8.5pt !important;
  line-height: 1.05 !important;
  overflow-wrap: anywhere !important;
  white-space: pre-wrap !important;
}

@media print {
  .week-grid {
    grid-template-columns: 28mm repeat(7, 1fr) !important;
  }

  .corner-cell {
    font-size: 8.5pt !important;
    border-radius: 2.5mm !important;
  }

  .time-cell.editable-row-cell .row-input {
    font-size: 8.3pt !important;
    line-height: 1.05 !important;
  }
}

@media (max-width: 1100px) {
  .week-grid {
    grid-template-columns: 135px repeat(7, minmax(140px, 1fr)) !important;
  }
}
