/* Work Wall — Apple Freeform / Notes style sticky board */

#appMain:has(> #tab-work-wall:not(.hidden)) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-bottom: 0 !important;
}

#tab-work-wall.work-wall-tab {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  background: #f2f2f7;
}

#tab-work-wall.work-wall-tab.hidden {
  display: none !important;
}

.work-wall-stage {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  background: #f2f2f7;
}

.work-wall-stage:fullscreen,
.work-wall-stage:-webkit-full-screen {
  background: #f2f2f7;
}

.work-wall-toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid rgba(60, 60, 67, 0.12);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  z-index: 2;
}

.work-wall-toolbar__title {
  margin: 0;
  margin-right: auto;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #1c1c1e;
  line-height: 1.15;
}

.work-wall-filters {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.18rem;
  border-radius: 9px;
  background: rgba(118, 118, 128, 0.12);
}

.work-wall-filter {
  appearance: none;
  border: 0;
  margin: 0;
  padding: 0.35rem 0.7rem;
  border-radius: 7px;
  background: transparent;
  color: #3a3a3c;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
}

.work-wall-filter.is-active {
  background: #fff;
  color: #1c1c1e;
  box-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
}

.work-wall-toolbar__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.work-wall-btn {
  appearance: none;
  border: 0;
  margin: 0;
  min-height: 2rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  background: rgba(0, 122, 255, 0.1);
  color: #007aff;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 650;
  cursor: pointer;
  line-height: 1.2;
}

.work-wall-btn:hover {
  background: rgba(0, 122, 255, 0.16);
}

.work-wall-btn--ghost {
  background: rgba(118, 118, 128, 0.12);
  color: #3a3a3c;
}

.work-wall-btn--ghost:hover {
  background: rgba(118, 118, 128, 0.18);
}

.work-wall-board-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.work-wall-board {
  position: relative;
  min-width: 100%;
  min-height: 100%;
  width: 100%;
  /* Soft whiteboard + faint grid */
  background-color: #fafafa;
  background-image:
    linear-gradient(rgba(60, 60, 67, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(60, 60, 67, 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: -1px -1px;
}

.work-wall-empty,
.work-wall-loading,
.work-wall-error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 2rem;
  text-align: center;
  pointer-events: none;
  z-index: 1;
}

/* Class display:flex would otherwise override the UA [hidden] { display:none }. */
.work-wall-empty[hidden],
.work-wall-loading[hidden],
.work-wall-error[hidden] {
  display: none !important;
}

.work-wall-empty__title,
.work-wall-loading__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1c1c1e;
}

.work-wall-empty__hint,
.work-wall-loading__hint,
.work-wall-error {
  margin: 0;
  max-width: 22rem;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  color: #8e8e93;
}

.work-wall-error {
  color: #ff3b30;
  pointer-events: none;
}

.work-wall-note {
  position: absolute;
  display: flex;
  flex-direction: column;
  width: 12.5rem;
  min-height: 10.75rem;
  box-sizing: border-box;
  padding: 0.85rem 0.9rem 0.55rem;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 8px 20px rgba(0, 0, 0, 0.08);
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: box-shadow 0.15s ease, transform 0.12s ease, background 0.18s ease;
  z-index: 2;
}

.work-wall-note:hover {
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.06),
    0 14px 28px rgba(0, 0, 0, 0.12);
  z-index: 4;
}

.work-wall-note.is-dragging {
  cursor: grabbing;
  z-index: 10;
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.1),
    0 22px 40px rgba(0, 0, 0, 0.16);
  transition: none;
}

/* Soft Freeform-style sticky palette — light pastels. */
.work-wall-note--hue-0 {
  background: linear-gradient(165deg, #fffef5 0%, #fff4b8 100%);
}
.work-wall-note--hue-1 {
  background: linear-gradient(165deg, #fff7fb 0%, #ffd7e8 100%);
}
.work-wall-note--hue-2 {
  background: linear-gradient(165deg, #f5fff8 0%, #d4f5e0 100%);
}
.work-wall-note--hue-3 {
  background: linear-gradient(165deg, #f5faff 0%, #d4e9ff 100%);
}
.work-wall-note--hue-4 {
  background: linear-gradient(165deg, #fff9f3 0%, #ffe0c8 100%);
}
.work-wall-note--hue-5 {
  background: linear-gradient(165deg, #faf7ff 0%, #e6d9ff 100%);
}
.work-wall-note--hue-6 {
  background: linear-gradient(165deg, #f4fffd 0%, #d2f4f0 100%);
}
.work-wall-note--hue-7 {
  background: linear-gradient(165deg, #fff8fb 0%, #ffd6e4 100%);
}

.work-wall-note--task .work-wall-note__chip {
  background: rgba(255, 149, 0, 0.22);
  color: #9a3412;
}

.work-wall-note--ticket .work-wall-note__chip {
  background: rgba(0, 122, 255, 0.18);
  color: #1d4ed8;
}

.work-wall-note.is-progress,
.work-wall-note.is-started {
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 10px 24px rgba(0, 0, 0, 0.12),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.55);
}

.work-wall-note__chip {
  display: inline-flex;
  align-items: center;
  margin: 0 0 0.45rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: #3a3a3c;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.work-wall-note__ref {
  margin: 0 0 0.25rem;
  font-size: 0.7rem;
  font-weight: 650;
  color: rgba(60, 60, 67, 0.65);
  letter-spacing: 0.02em;
}

.work-wall-note__title {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #1c1c1e;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work-wall-note__meta {
  margin: 0;
  margin-top: auto;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(60, 60, 67, 0.72);
  line-height: 1.3;
}

.work-wall-note__status {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #007aff;
}

.work-wall-note__colors {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.2rem;
  margin-top: 0.55rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  opacity: 0.72;
  transition: opacity 0.15s ease;
}

.work-wall-note:hover .work-wall-note__colors,
.work-wall-note:focus-within .work-wall-note__colors {
  opacity: 1;
}

.work-wall-note__swatch {
  width: 0.85rem;
  height: 0.85rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  cursor: pointer;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  touch-action: manipulation;
}

.work-wall-note__swatch:hover,
.work-wall-note__swatch:focus-visible {
  transform: scale(1.18);
  outline: none;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.9),
    0 0 0 3.5px rgba(0, 0, 0, 0.18);
}

.work-wall-note__swatch.is-active {
  transform: scale(1.12);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.95),
    0 0 0 3.5px rgba(0, 122, 255, 0.55);
}

.work-wall-note__swatch--0 { background: #fff4b8; }
.work-wall-note__swatch--1 { background: #ffd7e8; }
.work-wall-note__swatch--2 { background: #d4f5e0; }
.work-wall-note__swatch--3 { background: #d4e9ff; }
.work-wall-note__swatch--4 { background: #ffe0c8; }
.work-wall-note__swatch--5 { background: #e6d9ff; }
.work-wall-note__swatch--6 { background: #d2f4f0; }
.work-wall-note__swatch--7 { background: #ffd6e4; }

[data-theme='dark'] #tab-work-wall.work-wall-tab,
[data-theme='dark'] .work-wall-stage,
[data-theme='dark'] .work-wall-stage:fullscreen,
[data-theme='dark'] .work-wall-stage:-webkit-full-screen {
  background: #000;
}

[data-theme='dark'] .work-wall-toolbar {
  background: rgba(28, 28, 30, 0.82);
  border-bottom-color: rgba(84, 84, 88, 0.45);
}

[data-theme='dark'] .work-wall-toolbar__title {
  color: #f5f5f7;
}

[data-theme='dark'] .work-wall-filters {
  background: rgba(118, 118, 128, 0.24);
}

[data-theme='dark'] .work-wall-filter {
  color: #ebebf5;
}

[data-theme='dark'] .work-wall-filter.is-active {
  background: #3a3a3c;
  color: #fff;
}

[data-theme='dark'] .work-wall-board {
  background-color: #1c1c1e;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
}

[data-theme='dark'] .work-wall-empty__title,
[data-theme='dark'] .work-wall-loading__title {
  color: #f5f5f7;
}

@media (max-width: 720px) {
  .work-wall-toolbar {
    padding: 0.7rem 0.85rem;
  }

  .work-wall-toolbar__title {
    width: 100%;
    font-size: 1.2rem;
  }

  .work-wall-note {
    width: 10.75rem;
    min-height: 8.75rem;
  }
}
